This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Moving to -std=gnu11 (another case for requiring GCC >= 4.7)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Thu, 1 Oct 2015 14:43:19 +0000
- Subject: Moving to -std=gnu11 (another case for requiring GCC >= 4.7)
- Authentication-results: sourceware.org; auth=none
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