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
This commit is contained in:
parent
8909b58efa
commit
05f30b866f
4 changed files with 23 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
10
gcc/testsuite/g++.dg/diagnostic/pr60862.C
Normal file
10
gcc/testsuite/g++.dg/diagnostic/pr60862.C
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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" }
|
||||
}
|
Loading…
Add table
Reference in a new issue