This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING#3][PATCH][RFC] Warning for C++ malformed typedef [PR c++/23689]
- From: "Manuel López-Ibáñez" <lopezibanez at gmail dot com>
- To: "Nathan Sidwell" <nathan at codesourcery dot com>
- Cc: "Simon Baldwin" <simonb at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Feb 2007 11:46:32 +0000
- Subject: Re: [PING#3][PATCH][RFC] Warning for C++ malformed typedef [PR c++/23689]
- References: <45E4AAF1.40209@google.com> <45E56206.6050301@codesourcery.com>
On 28/02/07, Nathan Sidwell <nathan@codesourcery.com> wrote:
Simon Baldwin wrote:
> The following change remains unreviewed and un-commented-on:
>
> http://gcc.gnu.org/ml/gcc-patches/2007-02/msg00114.html
>
> It's a two line change, accompanied by a tiny bit of test code.
The patch is ok, but can you check the error message. IIRC the ' chars should
be %< and %> or similar. ok with that change, if it's needed.
In short,
- warning (0, "'typedef' was ignored in this declaration");
+ warning (0, "%<typedef%> was ignored in this declaration");
Also, Simon says:
"Two of the existing
tests also generate the warning: in typedef2, the warning is not noted by
dejagnu because of an error at the same line;"
This is likely because DejaGNU is too greedy right now, so the
dg-error matches both messages. This is a bug that hopefully will be
fixed someday, so we should not rely on this behaviour to lazily avoid
adding the correct dg-* options. So, please, try to match each message
with the appropriate dg-error / dg-warning. That is, if there is an
error and a warning, then there should be a dg-error and a dg-warning.
I am not a maintainer, so unless a maintainer agrees with me, you may
ignore my comments.
Cheers,
Manuel.