re PR c++/60415 (Bogus "invalid use of qualified-name")
PR c++/60415 PR c++/54359 * parser.c (cp_parser_direct_declarator): Set declarator to cp_error_declarator on invalid qualified-id. From-SVN: r208332
This commit is contained in:
parent
0c72fa788d
commit
201fe4c608
@ -1,3 +1,10 @@
|
||||
2014-03-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/60415
|
||||
PR c++/54359
|
||||
* parser.c (cp_parser_direct_declarator): Set declarator to
|
||||
cp_error_declarator on invalid qualified-id.
|
||||
|
||||
2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/60376
|
||||
|
@ -17456,6 +17456,7 @@ cp_parser_direct_declarator (cp_parser* parser,
|
||||
/* But declarations with qualified-ids can't appear in a
|
||||
function. */
|
||||
cp_parser_error (parser, "qualified-id in declaration");
|
||||
declarator = cp_error_declarator;
|
||||
break;
|
||||
}
|
||||
pushed_scope = push_scope (scope);
|
||||
|
15
gcc/testsuite/g++.dg/parse/ambig8.C
Normal file
15
gcc/testsuite/g++.dg/parse/ambig8.C
Normal file
@ -0,0 +1,15 @@
|
||||
// PR c++/60415
|
||||
|
||||
namespace b {
|
||||
enum type_t { warning };
|
||||
}
|
||||
|
||||
struct d {
|
||||
d(b::type_t) { }
|
||||
int operator()() { return 0; }
|
||||
};
|
||||
|
||||
int main()
|
||||
{
|
||||
d(b::warning)() + 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user