Commit 4d5fe289 by Mark Mitchell Committed by Mark Mitchell

re PR c++/14278 (fails when calling through a function pointer)

	PR c++/14278
	* parser.c (cp_parser_parameter_declaration_list): Commit
	to fewer tentative parses.

	PR c++/14278
	* g++.dg/parse/comma1.C: New test.

From-SVN: r78542
parent 93b5da76
2004-02-26 Mark Mitchell <mark@codesourcery.com>
PR c++/14278
* parser.c (cp_parser_parameter_declaration_list): Commit
to fewer tentative parses.
2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14284 PR c++/14284
......
...@@ -11108,6 +11108,7 @@ cp_parser_parameter_declaration_list (cp_parser* parser) ...@@ -11108,6 +11108,7 @@ cp_parser_parameter_declaration_list (cp_parser* parser)
cannot use this technique when inside a template argument cannot use this technique when inside a template argument
list. */ list. */
if (!parser->in_template_argument_list_p if (!parser->in_template_argument_list_p
&& !parser->in_type_id_in_expr_p
&& cp_parser_parsing_tentatively (parser) && cp_parser_parsing_tentatively (parser)
&& !cp_parser_committed_to_tentative_parse (parser) && !cp_parser_committed_to_tentative_parse (parser)
/* However, a parameter-declaration of the form /* However, a parameter-declaration of the form
......
2004-02-26 Mark Mitchell <mark@codesourcery.com>
PR c++/14278
* g++.dg/parse/comma1.C: New test.
2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org> 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14284 PR c++/14284
......
// PR c++/14278
struct X {
X (int p);
};
struct A {
A(X);
};
void *p_fun;
A a(X ((*(int (*)(int, int)) p_fun)(0, 0)));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment