re PR c++/10603 (failing to print problematic token upon parse error)
authorMark Mitchell <mark@codesourcery.com>
Wed, 17 Dec 2003 16:58:14 +0000 (16:58 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 17 Dec 2003 16:58:14 +0000 (16:58 +0000)
commit5c832178f89fcb4115dab67587c694f654c23d1d
treeab32363f39e685469055a01af67df1879b9c1fc8
parent8f0f6aa1fd95249ff405378b1716dc9050e72401
re PR c++/10603 (failing to print problematic token upon parse error)

PR c++/10603
PR c++/12827
* parser.c (cp_parser_error): Help c_parse_error print good
messages if the next token is a keyword.
(cp_parser_parameter_declaration_list): When resynchronizing after
a bad parameter declaration, stop if a comma is found.
(cp_parser_parameter_declaration): Avoid backtracking.

PR c++/10603
* g++.dg/parse/error6.C: New test.

PR c++/12827
* g++.dg/parse/error7.C: New test.

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