[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: Wed, 26 Sep 2012 16:24:19 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Sep 25, 2012 at 05:57:08PM -0700, Paul Eggert wrote:
> On 09/25/2012 05:04 PM, Adrian Bunk wrote:
> > If a future gcc version
> > ...
> > supports C11 features in gnu11 mode it doesn't support in
> > gnu99 mode (likely)
> I don't see this as likely, as I don't see any such features on the
> horizon.  (I am excluding gets, which we don't want to be encouraging anyway.)

You assume gnu99 will always include all features of gnu11?

> > Currently gcc is the only compiler where autoconf knows how to put it 
> > into C11 mode, and __STDC_VERSION__ is defined in gnu11 mode.
> But gcc normally doesn't define __STDC_VERSION__.  Granted,
> gcc --std=gnu11 does define it, but all in all __STDC_VERSION__
> is a bit squirrelly and I'd rather not be using it as part of a test.

gcc defines __STDC_VERSION__ except for pre-C94 modes like gnu89 (which 
is the default), since __STDC_VERSION__ was not defined in the original C89.

- we are discussing here only C11 mode detection and setting
- currently gcc >= 4.7 is the only compiler supported for that in 
- there is the option to make that part of the check  gcc-only later if 
  it would turn out that this is needed when C11 setting  for other 
  compilers will get added.



       "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]