[cfe-dev] Unexpected warning in -std=gnu89 -pedantic mode.

Douglas Gregor dgregor at apple.com
Wed Aug 26 15:57:32 PDT 2009


On Aug 26, 2009, at 1:44 PM, Eli Friedman wrote:

> On Wed, Aug 26, 2009 at 1:32 PM, Douglas Gregor<dgregor at apple.com>  
> wrote:
>>
>> On Aug 26, 2009, at 1:28 PM, Eli Friedman wrote:
>>
>> On Wed, Aug 26, 2009 at 12:57 PM, Enea Zaffanella<zaffanella at cs.unipr.it 
>> >
>> wrote:
>> The issue here is that arguably, almost everything which we print a
>> warning for with -pedantic is a GNU extension, since they're
>> violations of the standard and implemented by gcc.  Also, I'm not  
>> sure
>> what we would gain by classifying extension warnings into GNU
>> extensions and "generic" extensions.
>>
>> Well, we also support some Microsoft extensions and OpenCL  
>> constructs. One
>> could imagine keeping these separate, so that users could call  
>> Clang in a
>> GCC-like mode, Microsoft-like mode, or whatever.
>> - Doug
>
> Okay... so then a GNU extension would be anything we don't want in
> msvc-like mode?  That's a reasonable classification, I guess.  I doubt
> anyone would want the set of warnings which are not GNU extensions
> using that classification scheme, though.

A GNU extension is something that GNU supports and isn't part of the  
base language. Same deal with Microsoft extensions, and it's natural  
that some extensions will be available in both modes.

	- Doug




More information about the cfe-dev mailing list