re PR c++/26997 (g++ reports misleading error message when the identifier with error...
authorManuel López-Ibáñez <manu@gcc.gnu.org>
Wed, 29 Oct 2008 16:05:27 +0000 (16:05 +0000)
committerManuel López-Ibáñez <manu@gcc.gnu.org>
Wed, 29 Oct 2008 16:05:27 +0000 (16:05 +0000)
commitd3f7b2c67ed130a856a1d7425e76d69d47bb6006
tree9c49a5c382331cf9f1fdb138bf377d7c9a3eb901
parente49cf927540b9eda4c905538d401fa0c27cd174a
re PR c++/26997 (g++ reports misleading  error message when the identifier with error occurs earlier on the same line)

2008-10-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c++/26997
cp/
* parser.c (cp_parser_token_starts_cast_expression): New.
(cp_parser_cast_expression): Peek the next token to decide whether
this could be a parenthesized constructor or is definitely an
actual cast.
testsuite/
* g++.dg/parse/pr26997.C: New.

From-SVN: r141429
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/pr26997.C [new file with mode: 0644]