This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] Miscellaneous 'safe' testsuite changes.


On Mon, 20 Feb 2017, Carlos O'Donell wrote:

> > math/test-misc.c was using #ifndef NO_LONG_DOUBLE, which is an internal
> > configuration macro, to decide whether to do certain tests involving
> > 'long double'.  I changed the test to #if LDBL_MANT_DIG > DBL_MANT_DIG
> > instead, which uses only public float.h macros and is equivalent on
> > all supported platforms.  (Note that NO_LONG_DOUBLE doesn't mean 'the
> > compiler doesn't support long double', it means 'long double is the
> > same as double'.)  It's possible that instead we should just do these
> > tests unconditionally on all platforms.
> 
> Doing all the tests on all platforms is what we should have done from the
> start to verify everything works as expected. However, your changes are
> the right minimal fix for math/test-misc.c.

I agree the tests of long double functions should be run even when long 
double functions alias the double ones.  But that depends on patch 4 
(which stops most tests from being built with _LIBC defined) to do cleanly 
(as in the case where they are aliases, the long double functions aren't 
declared when _LIBC is defined, since the code defining them as aliases 
wouldn't work if they were declared - you can't define aliases when 
declarations with different types are visible).  The changes to use 
LDBL_MANT_DIG > DBL_MANT_DIG seem clearly the right thing for patch 3 in 
this series.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]