bug-autoconf
[Top][All Lists]
Advanced

[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 00:22:32 +0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Sep 25, 2012 at 01:58:29PM -0700, Paul Eggert wrote:
> Sorry, I don't see a bug there.  "gcc -std=gnu99"
> accepts ISO C11, in the sense that it passes all the
> C11 tests that we have, if your version of GCC is
> sufficiently new.  This is because the GCC supports
> these C11 features even when running in C99 mode.

The only compiler for which autoconf currently knows how to set it into 
C11 mode passes the test in C99 mode.

That sounds a bit odd to me.

> If there's some C11 feature that is missing,
> a feature that it's reasonable to expect from C11
> compilers, we could add that to the test, and this
> will cause 'configure' to say "no" rather than "yes".
> I did briefly try to think of such a feature but
> came up dry.

What about

#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 201112L)
#error compiler is not in C11 mode
#endif


cu
Adrian

-- 

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