re PR c++/9109 (parse ambiguity)
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 6 Jan 2003 18:40:22 +0000 (18:40 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 6 Jan 2003 18:40:22 +0000 (18:40 +0000)
commit62b8a44e2617685f1094b108869f2c71f38f33af
tree649fe3bdf8170a387fdf89fd878e30bb2641d027
parente914a571723bd02ba7236eacbbc97a4c5d80bce0
re PR c++/9109 (parse ambiguity)

cp:
PR c++/9109
* parser.c (cp_parser_declarator_kind): New enum.
(cp_parser_declarator): Adjust.
(cp_parser_direct_declarator): Adjust. Allow for either named or
abstract declarator. Prefer abstract, if possible. Allow
parenthesized function name.
(cp_parser_condition): Adjust cp_parser_declarator call.
(cp_parser_explicit_instantiation): Likewise.
(cp_parser_init_declarator): Likewise.
(cp_parser_type_id): Likewise.
(cp_parser_function_definition): Likewise.
(cp_parser_member_declaration): Likewise.
(cp_parser_parameter_declaration): Use cp_parser_declarator to do
the tentative parsing.
(cp_parser_exception_declaration): Likewise.
testsuite:
* g++.dg/parse/ambig1.C: New test.
* g++.dg/parse/defarg2.C: New test.

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