* c-common.h (c_parse_error): Declare it. * c-common.c (c_parse_error): New function. * c-parse.y (yyerror): Use it. * parser.c (struct cp_parser): Add in_template_argument_list_p. (cp_parser_error): Use c_parse_error. (cp_parser_name_lookup_error): New function. (cp_parser_new): Initialize it. (cp_parser_declarator): Add parenthesized_p parameter. (cp_parser_nested_name_specifier_opt): Use cp_parser_name_lookup_error. (cp_parser_parenthesized_expression_list): Improve comments. (cp_parser_condition): Adjust call to cp_parser_declarator. (cp_parser_template_parameter): Adjust call to cp_parser_parameter_declaration. (cp_parser_template_argument_list): Set in_template_argument_list_p. (cp_parser_explicit_instantiation): Adjust call to cp_parser_declarator. (cp_parser_simple_type_specifier): Remove unncessary code. (cp_parser_using_declaration): Use cp_parser_name_lookup_error. (cp_parser_init_declarator): Handle member function definitions. (cp_parser_direct_declarator): Adjust call to cp_parser_declarator. (cp_parser_type_id): Adjust call to cp_parser_declarator. (cp_parser_parameter_declaration_list): Avoid backtracking where possible. (cp_parser_parameter_declaration): Add parenthesized_p parameter. (cp_parser_function_definition): Remove. (cp_parser_member_declaration): Do not backtrack to look for function definitions. (cp_parser_exception_declaration): Adjust call to cp_parser_declarator. (cp_parser_single_declaration): Handle function definitions via cp_parser_init_declarator. (cp_parser_save_member_function_body): New function. PR c++/10779 PR c++/12160 * g++.dg/parse/error3.C: New test. * g++.dg/parse/error4.C: Likewise. * g++.dg/abi/mangle4.C: Tweak error messages. * g++.dg/lookup/using5.C: Likewise. * g++.dg/other/error2.C: Likewise. * g++.dg/parse/typename5.C: Likewise. * g++.dg/parse/undefined1.C: Likewise. * g++.dg/template/arg2.C: Likewise. * g++.dg/template/ttp3.C: Likewise. * g++.dg/template/type1.C: Likewise. * g++.old-deja/g++.other/crash32.C: Likewise. * g++.old-djea/g++.pt/defarg8.C: Likewise. From-SVN: r74624
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog.1 | Loading commit data... | |
ChangeLog.2 | Loading commit data... | |
ChangeLog.egcs | Loading commit data... | |
Make-lang.in | Loading commit data... | |
NEWS | Loading commit data... | |
call.c | Loading commit data... | |
cfns.gperf | Loading commit data... | |
cfns.h | Loading commit data... | |
class.c | Loading commit data... | |
config-lang.in | Loading commit data... | |
cp-lang.c | Loading commit data... | |
cp-tree.def | Loading commit data... | |
cp-tree.h | Loading commit data... | |
cvt.c | Loading commit data... | |
cxx-pretty-print.c | Loading commit data... | |
cxx-pretty-print.h | Loading commit data... | |
cxxfilt.c | Loading commit data... | |
decl.c | Loading commit data... | |
decl.h | Loading commit data... | |
decl2.c | Loading commit data... | |
dump.c | Loading commit data... | |
error.c | Loading commit data... | |
except.c | Loading commit data... | |
expr.c | Loading commit data... | |
friend.c | Loading commit data... | |
g++spec.c | Loading commit data... | |
init.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lex.c | Loading commit data... | |
lex.h | Loading commit data... | |
mangle.c | Loading commit data... | |
method.c | Loading commit data... | |
name-lookup.c | Loading commit data... | |
name-lookup.h | Loading commit data... | |
operators.def | Loading commit data... | |
optimize.c | Loading commit data... | |
parser.c | Loading commit data... | |
pt.c | Loading commit data... | |
ptree.c | Loading commit data... | |
repo.c | Loading commit data... | |
rtti.c | Loading commit data... | |
search.c | Loading commit data... | |
semantics.c | Loading commit data... | |
tree.c | Loading commit data... | |
typeck.c | Loading commit data... | |
typeck2.c | Loading commit data... |