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

Douglas Gregor dgregor at apple.com
Wed Aug 26 08:59:32 PDT 2009


On Aug 26, 2009, at 8:54 AM, Fariborz Jahanian wrote:

>
> On Aug 26, 2009, at 8:04 AM, Douglas Gregor wrote:
>
>>
>> On Aug 26, 2009, at 5:12 AM, Enea Zaffanella wrote:
>>> There seems to be a problem in the handling of diagnostic for GNU
>>> extensions: some warnings are produced even though the -std=gnu89
>>> option
>>>
>>
>> The fix for this issue would be to change 1311 of ParseExpr.cpp from
>>
>>    Diag(Tok, diag::ext_gnu_statement_expr);
>>
>> to
>>
>>  if (!getLang().GNUMode)
>>    Diag(Tok, diag::ext_gnu_statement_expr);
> Instead of checking for gnu mode, can we have a diagnostic group for  
> all such diagnostics
> and ignore them in -std=gnu89 mode?

That is a great idea!

	- Doug



More information about the cfe-dev mailing list