Moving to -std=gnu11 (another case for requiring GCC >= 4.7)
Joseph Myers
joseph@codesourcery.com
Thu Oct 1 14:43:00 GMT 2015
What do people think of moving glibc to build with -std=gnu11 (the default
in GCC 5 and later) instead of -std=gnu99?
Note 1: -std=gnu99 is hardcoded in Makeconfig. GCC 4.6 only has
-std=gnu1x not -std=gnu11. So to support 4.6 we'd either have to hardcode
building with the deprecated -std=gnu1x name (which doesn't really seem a
good idea) or add a configure test.
Note 2: libm-test.inc currently uses the macros __FLT_DENORM_MIN__ etc.;
using -std=gnu11 would allow moving to the standard versions FLT_TRUE_MIN
etc. (which GCC 4.6 has in float.h, but only when compiling in C11 mode,
not for -std=gnu99). I'd also like to use the macros FLT_DECIMAL_DIG etc.
(which again require C11 mode to use the standard versions rather than the
GCC predefines).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list