* call.c (build_scoped_method_call): Check it is not a namespace.

From-SVN: r36094
This commit is contained in:
Nathan Sidwell 2000-09-01 09:32:26 +00:00 committed by Nathan Sidwell
parent 0479a46292
commit 4f8025eb06
2 changed files with 9 additions and 0 deletions

View 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.

View 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;