Commit 05f30b86 by Marek Polacek Committed by Marek Polacek

re PR c++/60862 (bad location in invalid conversion error)

	PR c++/60862
	* parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
	location of a call expression.

	* g++.dg/diagnostic/pr60862.C: New test.

From-SVN: r215235
parent 8909b58e
2014-09-13 Marek Polacek <polacek@redhat.com>
PR c++/60862
* parser.c (cp_parser_postfix_expression) <case CPP_OPEN_PAREN>: Set
location of a call expression.
2014-09-11 Jason Merrill <jason@redhat.com>
PR c++/63201
......
......@@ -6227,6 +6227,8 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
koenig_p,
complain);
protected_set_expr_location (postfix_expression, token->location);
/* The POSTFIX_EXPRESSION is certainly no longer an id. */
idk = CP_ID_KIND_NONE;
......
2014-09-13 Marek Polacek <polacek@redhat.com>
PR c++/60862
* g++.dg/diagnostic/pr60862.C: New test.
2014-09-12 Richard Biener <rguenther@suse.de>
PR middle-end/63237
......
// PR c++/60862
// { dg-do compile }
extern void **bar (int, void *, int);
void
foo (int x, int y)
{
int **s = bar (x, &x, y); // { dg-error "17:invalid conversion" }
}
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