[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug: "gcc -std=gnu99" passes AC_PROG_CC_C11

From: Adrian Bunk
Subject: Re: bug: "gcc -std=gnu99" passes AC_PROG_CC_C11
Date: Thu, 27 Sep 2012 17:29:08 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 26, 2012 at 08:09:48PM -0700, Paul Eggert wrote:
> >> C11 is not incompatible with C99, the way that C99 was incompatible with 
> >> C89.
> > The CC="gcc -std=gnu99" is needed in my example, it is not a part of the 
> > scenario when the compiler defaults to C99 - which is neither for gcc 
> > nor for other compilers that implausible.
> Yes, that's plausible.

And now I also found a case where the difference between gnu99 and gnu11 
matters today:

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()
- static_assert

> But having '-std=gnu11' break things doesn't
> sound plausible.

Sorry, I shouldn't have started talking about a separate different thing 
in one email with my "does -std=gnu11 break anything?" remark.

> > So autoconf is now trying an option that will fail the test with the 
> > current compiler, and will likely be deprecated
> Perhaps we should back off on how many C11 features we're checking, so
> that IBM XL C V12.1 passes too?  That might be more useful.

On a downside, that requires users to check for more features.

It's a policy decision which features should be guaranteed to be 
available when ac_cv_prog_cc_c11 is not "no", and for which features 
autoconf should provide separate tests and autoconf users then have
to check separately.



       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

reply via email to

[Prev in Thread] Current Thread [Next in Thread]