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:
Jason Merrill 2014-03-04 17:16:03 -05:00 committed by Jason Merrill
parent 0c72fa788d
commit 201fe4c608
3 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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);

View 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;
}