aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-09-01 09:32:26 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-09-01 09:32:26 +0000
commit4f8025eb069de4a55d8f152bf1a6c952ad7ccd01 (patch)
tree64dab252919997752d59a0eee14734f9b4787a22 /gcc
parent0479a46292a4ead8ef2be5a122603432c754cd3d (diff)
downloadgcc-4f8025eb069de4a55d8f152bf1a6c952ad7ccd01.zip
gcc-4f8025eb069de4a55d8f152bf1a6c952ad7ccd01.tar.gz
gcc-4f8025eb069de4a55d8f152bf1a6c952ad7ccd01.tar.bz2
* call.c (build_scoped_method_call): Check it is not a namespace.
From-SVN: r36094
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/call.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 033185e..402c873 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
+
+ * call.c (build_scoped_method_call): Check it is not a namespace.
+
2000-08-30 Jason Merrill <jason@redhat.com>
* cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 9c2b295db..ff72fc8 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -275,6 +275,11 @@ build_scoped_method_call (exp, basetype, name, parms)
}
}
+ if (TREE_CODE (basetype) == NAMESPACE_DECL)
+ {
+ cp_error ("`%D' is a namespace", basetype);
+ return error_mark_node;
+ }
if (! is_aggr_type (basetype, 1))
return error_mark_node;