aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1999-03-15 13:08:26 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-03-15 13:08:26 +0000
commitb5d51daa7ebfe61e0d7f7d1893f43cc56221da22 (patch)
treea1b67b75fa9e8b2caf06c086e9bbd884545cb470 /gcc
parentdd5351428305e43d9d78449f978483dd58943d87 (diff)
downloadgcc-b5d51daa7ebfe61e0d7f7d1893f43cc56221da22.zip
gcc-b5d51daa7ebfe61e0d7f7d1893f43cc56221da22.tar.gz
gcc-b5d51daa7ebfe61e0d7f7d1893f43cc56221da22.tar.bz2
decl2.c (validate_nonmember_using_decl): Issue sensible error-messages on bogus qualifiers.
* decl2.c (validate_nonmember_using_decl): Issue sensible error-messages on bogus qualifiers. From-SVN: r25781
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/decl2.c5
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 1f2be5f..c2b52d4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 56f5839..f7c6f06 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -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;
}
}