* call.c (build_scoped_method_call): Check it is not a namespace.
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 1 Sep 2000 09:32:26 +0000 (09:32 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 1 Sep 2000 09:32:26 +0000 (09:32 +0000)
From-SVN: r36094

gcc/cp/ChangeLog
gcc/cp/call.c

index 033185e40219898e6fc33c2994c341a6a30b2797..402c873fa0ee5cf7a9b529be35cb5096d9dc0e08 100644 (file)
@@ -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.
index 9c2b295dbb5e32e68375d24b81261184f5fb10c3..ff72fc8d1a0aea7a365bdd58effc581c63360797 100644 (file)
@@ -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;