PATCH RFA: -Wc++-compat warning about duplicate decls

Dave Korn dave.korn.cygwin@googlemail.com
Sat Jun 20 12:02:00 GMT 2009


Robert Dewar wrote:
> Ian Lance Taylor wrote:
>> In C, it's OK to write
>>   int i;
>>   int i;
>> In C++, it is not.  This patch adds a -Wc++-compat warning for this
>> case.  This patch requires approval from the C frontend maintainers.
> 
> shouldn't this in any case generate a warning in C, how can
> it be useful to do this, regardless of C++ compatibility.

  I don't understand.  These are just uninitialised commons, aren't they?  Why
would a C compiler warn about that?

    cheers,
      DaveK



More information about the Gcc-patches mailing list