This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR c++/26997 g++ reports misleading error message when the identifier with error occurs earlier on the same line
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 27 Oct 2008 09:25:50 -0700
- Subject: Re: PR c++/26997 g++ reports misleading error message when the identifier with error occurs earlier on the same line
- References: <6c33472e0810260500x782dd2a5xda0029ef57e5771a@mail.gmail.com>
Manuel López-Ibáñez wrote:
> The patch should be self-explanatory (otherwise, it needs more
> comments). There may be other ways to improve this. See
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26997#c5
> 2008-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
>
> PR c++/26997
> cp/
> * parser.c (cp_parser_cast_expression): Parse definitely if we are
> sure this is a cast to non-function type.
> testsuite/
> * g++.dg/warn/pr26997.C: New.
I think the idea here is somewhat ugly, but I'm not sure how to do better.
However, I think the use of the goto in your implementation is
unfortunate. Please resubmit using a flag to avoid that.
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713