summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-01 09:32:26 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-01 09:32:26 +0000
commit7cdfe1ce8b20c6392726b5e2a9544c977f155f8e (patch)
tree64dab252919997752d59a0eee14734f9b4787a22 /gcc/cp/call.c
parent0c7e3476593469c87e564344bef30ecab4306841 (diff)
downloadgcc-7cdfe1ce8b20c6392726b5e2a9544c977f155f8e.tar.gz
* call.c (build_scoped_method_call): Check it is not a namespace.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36094 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 9c2b295dbb5..ff72fc8d1a0 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;