[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: Andrew W. Nosenko
Subject: Re: bug: "gcc -std=gnu99" passes AC_PROG_CC_C11
Date: Fri, 28 Sep 2012 17:39:24 +0300

On Fri, Sep 28, 2012 at 4:22 PM, Adrian Bunk <address@hidden> wrote:
> On Fri, Sep 28, 2012 at 04:10:29PM +0300, Andrew W. Nosenko wrote:
>> On Fri, Sep 28, 2012 at 3:34 PM, Adrian Bunk <address@hidden> wrote:
>> > On Thu, Sep 27, 2012 at 06:12:55PM -0700, Paul Eggert wrote:
>> >> On 09/27/2012 10:04 AM, Adrian Bunk wrote:
>> >> > I merely wanted to point out that there can be a difference in what
>> >> > glibc provides when we end up with gnu99 instead of gnu11.
>> >>
>> >> Yes.  And programs using Autoconf will surely prefer the gnu11
>> >> version, which is why defaulting to gnu11 is a win.
>> >>...
>> >
>> > Which brings us back to why I call it a bug that gnu99 passes the
>> > current C11 test.
>> Exuse me, but if compiler+language support library passes all feature
>> checks, which are essencial to name this pair c11-compatible, then why
>> bother?
>> If c11-compatibility implies more than these checks, then why not
>> extend the checks for cover these essencial features?
>> But please, dont start the messing with brain-dameged defines like
>> __STDC_VERSION__.  After all, Autoconf is all about the actual
>> features of compilation environment, not about "branding labels" on
>> that environment.
> C11 compatibility implies the correct __STDC_VERSION__ value.

Are you never seen compilers that lie in defines?  ICC and Clang both
define __GNUC__ just for pass thru Linux and/or Glibc headers, for

> And as I already explained here in this thread the __STDC_VERSION__
> value set by the compiler does matter, e.g. with glibc it enables some
> C11 functionality in the C library.

Then check this functionality, not define itself!
If you think, for example, that quick_exit() is essencial, -- OK,
check for quick_exit().
_Static_assert? -- OK, check for _Static_assert.

Why check for guard defines and then imply that corresponding
functionality exists if you can to check this functionality directly?
Please, be practical!  Autoconf is for build the real projects in the
real environment, not the pedantic standard-complaince test for
purposes of formal ISO certification.

Andrew W. Nosenko <address@hidden>

reply via email to

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