Commit 62bfce90 by Mark Mitchell Committed by Mark Mitchell

re PR c++/11149 (ICE on error when instantiation with call function of a base type)

	PR c++/11149
	* call.c (resolve_scoped_fn_name): Check that the qualifying scope
	is a class type.

	PR c++/11149
	* g++.dg/lookup/scoped6.C: New test.

From-SVN: r68782
parent f64f3e74
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11149
* call.c (resolve_scoped_fn_name): Check that the qualifying scope
is a class type.
2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8046
......
......@@ -2765,6 +2765,8 @@ resolve_scoped_fn_name (tree scope, tree name)
if (TREE_CODE (scope) == NAMESPACE_DECL)
fn = lookup_namespace_name (scope, name);
else if (!CLASS_TYPE_P (scope))
error ("`%T' is not a class type", scope);
else
{
if (!TYPE_BEING_DEFINED (scope)
......
2003-07-01 Mark Mitchell <mark@codesourcery.com>
PR c++/11149
* g++.dg/lookup/scoped6.C: New test.
2003-07-01 Giovanni Bajo <giovannibajo@libero.it>
PR c++/8046
......
template <typename X>
class Foo {
int i;
public:
Foo() {
X::explode(); // { dg-error "" }
}
};
class Bar {
Foo<int> foo_;
public:
Bar() {} // { dg-error "instantiated" }
};
template class Foo<int>;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment