On 09/27/2012 07:29 AM, Adrian Bunk wrote:
> glibc 2.16 has the following protected by what boils down to
>   #if defined _GNU_SOURCE || defined _ISOC11_SOURCE || \
>       (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)
> 
> - timespec_get() and TIME_UTC
> - aligned_alloc()
> - at_quick_exit()
> - quick_exit()
> - CMPLX/CMPLXF/CMPLXL
> - static_assert

Thanks for mentioning that.  I'd missed those.  Normally
this is considered part of the C library, not of the C compiler,
so AC_PROG_CC shouldn't check for it.  But it is an argument for
people using either AC_PROG_CC or AC_USE_SYSTEM_EXTENSIONS,
so that they can get the above symbols.  (This is true for
older versions of Autoconf too, for AC_USE_SYSTEM_EXTENSIONS.)

> It's a policy decision which features should be guaranteed to be 
> available when ac_cv_prog_cc_c11 is not "no"

Yes, that's the dicey thing.  AC_PROG_CC doesn't really guarantee
C11 (or C99 or C89); it merely tries to do its best to make the
compiler more up-to-date.  In effect, Autoconf is warring against
the understandable conservativism of compiler implementers.
Autoconf-generated programs want the latest and greatest version,
whereas compiler-writers are often concerned that the latest version
will break ancient programs.  Hence compiler-writers are often too-
conservative about setting defaults, from Autoconf's point of view,
and Autoconf is striving to overcome that.  The features Autoconf
are testing for are a means to an end (getting more-up-to-date
compiler), not the end itself (a list of supported features; there
is no such list, really).

Reply via email to