decl2.c (validate_nonmember_using_decl): Issue sensible error-messages on bogus quali...
authorMark Mitchell <mark@markmitchell.com>
Mon, 15 Mar 1999 13:08:26 +0000 (13:08 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 15 Mar 1999 13:08:26 +0000 (13:08 +0000)
* decl2.c (validate_nonmember_using_decl): Issue sensible
error-messages on bogus qualifiers.

From-SVN: r25781

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 1f2be5fdde6e94f036bb0a2c45133e271c16c55e..c2b52d4816a789c416f2520901fed9a645d57251 100644 (file)
@@ -1,3 +1,8 @@
+1999-03-12  Mark Mitchell  <mark@markmitchell.com>
+
+       * decl2.c (validate_nonmember_using_decl): Issue sensible
+       error-messages on bogus qualifiers.
+       
 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
 
        * call.c (add_function_candidate): Fix uninitialized variable.
@@ -61,9 +66,6 @@
        * lex.c (do_identifier): Correct call to enforce_access.
        * search.c (accessible_p): Tweak comment.
 
-       * decl2.c (validate_nonmember_using_decl): Issue sensible
-       error-messages on bogus qualifiers.
-       
 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
 
        * semantics.c (begin_class_definition): Call build_self_reference.
index 56f583906e55c690dfc472fec47efb3b6931baca..f7c6f06754bdf593450daaab220e68490f726be2 100644 (file)
@@ -4679,7 +4679,10 @@ validate_nonmember_using_decl (decl, scope, name)
         member-declaration.  */
       if (TREE_CODE (*scope) != NAMESPACE_DECL)
        {
-         cp_error ("`%D' is not a namespace", *scope);
+         if (TYPE_P (*scope))
+           cp_error ("`%T' is not a namespace", *scope);
+         else
+           cp_error ("`%D' is not a namespace", *scope);
          return NULL_TREE;
        }
     }