Commit c3115fd2 by Mark Mitchell Committed by Mark Mitchell

re PR c++/24278 (ICE while trying to print out error)

	PR c++/24278
	* init.c (expand_member_init): Print messages about baseclasses
	using %T rather than %D.
	PR c++/24278
	* g++.dg/template/ctor5.C: New test.

From-SVN: r108840
parent 6b20b203
2005-12-19 Mark Mitchell <mark@codesourcery.com>
PR c++/24278
* init.c (expand_member_init): Print messages about baseclasses
using %T rather than %D.
PR c++/24915
* class.c (add_method): Do not treat templates as identical unless
their return types are the same.
......
......@@ -1019,11 +1019,11 @@ expand_member_init (tree name)
if (!direct_binfo && !virtual_binfo)
{
if (CLASSTYPE_VBASECLASSES (current_class_type))
error ("type %qD is not a direct or virtual base of %qT",
name, current_class_type);
error ("type %qT is not a direct or virtual base of %qT",
basetype, current_class_type);
else
error ("type %qD is not a direct base of %qT",
name, current_class_type);
error ("type %qT is not a direct base of %qT",
basetype, current_class_type);
return NULL_TREE;
}
......
2005-12-19 Mark Mitchell <mark@codesourcery.com>
PR c++/24278
* g++.dg/template/ctor5.C: New test.
PR c++/24915
* g++.dg/template/overload8.C: New test.
// PR c++/24278
template<typename T> struct A
{
A() : T(0) {} // { dg-error "base" }
};
A<int*> a; // { dg-error "instantiated" }
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