tst-strtod-round.c build failure on ARM

Will Newton will.newton@linaro.org
Fri Sep 12 11:19:00 GMT 2014


Hi,

With today's master tst-strtod-round.c fails to build on ARM:

tst-strtod-round.c: In function ‘test_in_one_mode’:
tst-strtod-round.c:7859:7: error: implicit declaration of function
‘copysignl’ [-Werror=implicit-function-declaration]
       || copysignl (1.0L, ld) != copysignl (1.0L, expected->ld))
       ^
tst-strtod-round.c:7859:10: warning: incompatible implicit declaration
of built-in function ‘copysignl’ [enabled by default]
       || copysignl (1.0L, ld) != copysignl (1.0L, expected->ld))
          ^
cc1: some warnings being treated as errors

The failure is caused by the implicit function declaration now being
treated as an error. math.h is included in tst-strtod-round.c for
copysignl but the declaration of copysignl is guarded with the
following conditional in math/math.h:

# if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
     || defined __LDBL_COMPAT

On ARM __LDBL_COMPAT is not defined (I am not sure where it ever gets
defined), but __NO_LONG_DOUBLE_MATH is and _LIBC is defined by
libc-symbols.h, which is explicitly included on the command line by
Makeconfig.

Does anybody know what the correct fix for this would be? It seems
strange to define _LIBC for test code but it looks like it is required
by some tests.

Thanks,

-- 
Will Newton
Toolchain Working Group, Linaro



More information about the Libc-alpha mailing list