Commit 4eb6d609 by Mark Mitchell Committed by Mark Mitchell

re PR c++/9384 (ICE in validate_nonmember_using_decl, at cp/decl2.c:4152)

	PR c++/9384
	* parser.c (cp_parser_using_declaration): Issue error messages
	about name resolution failures here.

	PR c++/9384
	* g++.dg/parse/using1.C: New test.

From-SVN: r61611
parent be0acd42
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9384
* parser.c (cp_parser_using_declaration): Issue error messages
about name resolution failures here.
PR c++/9388
* class.c (currently_open_derived_class): Use dependent_type_p.
* cp-tree.h (dependent_type_p): New function.
......
......@@ -9219,7 +9219,15 @@ cp_parser_using_declaration (parser)
else
{
decl = cp_parser_lookup_name_simple (parser, identifier);
if (scope)
if (decl == error_mark_node)
{
if (parser->scope && parser->scope != global_namespace)
error ("`%D::%D' has not been declared",
parser->scope, identifier);
else
error ("`::%D' has not been declared", identifier);
}
else if (scope)
do_local_using_decl (decl);
else
do_toplevel_using_decl (decl);
......
2003-01-22 Mark Mitchell <mark@codesourcery.com>
PR c++/9384
* g++.dg/parse/using1.C: New test.
PR c++/9285
PR c++/9294
* g++.dg/parse/expr2.C: New test.
......
namespace A { using ::B; } // { dg-error "" }
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