This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFA: -Wc++-compat warning about duplicate decls
- From: Ian Lance Taylor <iant at google dot com>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 19 Jun 2009 18:30:48 -0700
- Subject: Re: PATCH RFA: -Wc++-compat warning about duplicate decls
- References: <email@example.com> <4A3C34BC.firstname.lastname@example.org>
Robert Dewar <email@example.com> writes:
> 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.
It's not particularly useful, but since traditional C compilers accept
it, I don't think it rises to the level of a -Wall warning.