This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: compiler standards (and/or min gcc version) supported withinstalled headers ?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: Mike Frysinger <vapier at gentoo dot org>, <libc-alpha at sourceware dot org>
- Date: Wed, 2 Jan 2013 15:04:22 +0000
- Subject: Re: compiler standards (and/or min gcc version) supported withinstalled headers ?
- References: <201212282357.52390.vapier@gentoo.org> <201212292022.55088.vapier@gentoo.org><50E3EE2E.9070503@suse.com> <201301020459.54747.vapier@gentoo.org><50E407D7.3070404@suse.com>
On Wed, 2 Jan 2013, Andreas Jaeger wrote:
> The baseline is needed for adding new code so that we all agree what might
> need special handling and what not.
Well - there are plenty of cases that don't have fallbacks for older or
non-GCC compilers, even when they would be easy. E.g. complex.h only
defines the C11 CMPLX macros for GCC >= 4.7, though for older GCC you
could do an approximation (not usable in static initializers) with a
temporary variable and __real__ and __imag__ assignments. Or uchar.h not
defining char16_t and char32_t for GCC versions before 4.4 (when the
built-in __CHAR16_TYPE__ and __CHAR32_TYPE__ macros were added), or for
non-GCC, although the types are required by C11 to be the same as
uint_least16_t and uint_least32_t, so in fact glibc always has the
information to define them correctly.
--
Joseph S. Myers
joseph@codesourcery.com