This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR c++/26997 g++ reports misleading error message when the identifier with error occurs earlier on the same line


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]