re PR c++/20905 (confuses unrelated type name with instance name)
authorMark Mitchell <mark@codesourcery.com>
Fri, 8 Apr 2005 21:13:57 +0000 (21:13 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 8 Apr 2005 21:13:57 +0000 (21:13 +0000)
commitd4113656167b64f1c25138bbdf46d7f85ef1bd47
treeb7e912e2ceef8e6cf2a6d1ba9186e1ee98ce2282
parent12af7ba340f80ef1222034ebe0ce88a4130a0462
re PR c++/20905 (confuses unrelated type name with instance name)

PR c++/20905
* parser.c (cp_parser_type_specifier_seq): Add is_condition
parameter.
(cp_parser_new_type_id): Pass it.
(cp_parser_condition): Likewise.
(cp_parser_conversion_type_id): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_type_specifier_seq): In a condition, do not allow
invalid type-specifier combinations.
(cp_parser_exception_declaration): Adjust call to
cp_parser_type_specifier_seq.

PR c++/20905
* g++.dg/parse/cond2.C: New test.

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