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
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.
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.
--- /dev/null
+namespace A { using ::B; } // { dg-error "" }