Commit 201fe4c6 by Jason Merrill Committed by Jason Merrill

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
parent 0c72fa78
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> 2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/60376 PR c++/60376
......
...@@ -17456,6 +17456,7 @@ cp_parser_direct_declarator (cp_parser* parser, ...@@ -17456,6 +17456,7 @@ cp_parser_direct_declarator (cp_parser* parser,
/* But declarations with qualified-ids can't appear in a /* But declarations with qualified-ids can't appear in a
function. */ function. */
cp_parser_error (parser, "qualified-id in declaration"); cp_parser_error (parser, "qualified-id in declaration");
declarator = cp_error_declarator;
break; break;
} }
pushed_scope = push_scope (scope); pushed_scope = push_scope (scope);
......
// 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;
}
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