Default warnings and useless extensions (e.g. arithmetic on void *)

Andrew Pinski pinskia@gmail.com
Tue Jun 10 10:53:00 GMT 2008



Sent from my iPhone

On Jun 10, 2008, at 11:45, Tim Prince <TimothyPrince@sbcglobal.net>  
wrote:

> Vincent Lefevre wrote:
>> On 2008-06-09 16:02:05 +0200, Richard Guenther wrote:
>>
>>> Use -pedantic to warn about extensions. It doesn't make sense to
>>> warn for extensions if they are not deprecated. After all they are
>>> extensions.
>>>
>>
>> The problem with -pedantic is that it gives lots of spurious  
>> warnings.
>> We have code that uses useful (i.e. with no workarounds) extensions
>> and that is protected by #if, e.g.
>>
>> #ifdef HAVE_LONG_LONG
>>            case LONG_LONG_ARG:
>>              *(long long *) p = (long long) nchar;
>>              break;
>> #endif
>>
>>
> long long is an extension, if you don't specify -std=c99. You ask  
> for warnings about extensions, you get them.  Why didn't you post  
> this on gcc-help?

Also -Wno-long-long will disable the warning for long long. :)



More information about the Gcc mailing list