Commit 17d208b5 by Jason Merrill Committed by Jason Merrill

re PR c++/49387 (t.cxx:140: error: too many initializers for ‘const __class_type_info_pseudo’)

	PR c++/49387
	* rtti.c (get_pseudo_ti_index): Call complete_type.

From-SVN: r175743
parent 0bd96aad
2011-06-30 Jason Merrill <jason@redhat.com>
PR c++/49387
* rtti.c (get_pseudo_ti_index): Call complete_type.
PR c++/49569
* method.c (implicitly_declare_fn): Set DECL_PARM_LEVEL and
DECL_PARM_INDEX on rhs parm.
......
......@@ -406,6 +406,8 @@ get_tinfo_decl (tree type)
type = build_function_type (TREE_TYPE (type),
TREE_CHAIN (TYPE_ARG_TYPES (type)));
type = complete_type (type);
/* For a class type, the variable is cached in the type node
itself. */
if (CLASS_TYPE_P (type))
......
2011-06-30 Jason Merrill <jason@redhat.com>
PR c++/49387
* g++.dg/rtti/template1.C: New.
PR c++/49569
* g++.dg/cpp0x/regress/ctor1.C: New.
......
// PR c++/49387
#include <typeinfo>
struct ResourceMonitorClient { };
template <typename T> struct ResourcePool : public ResourceMonitorClient {
virtual ~ResourcePool() { }
};
template <typename T> struct BaseWriter {
BaseWriter() {
typeid(ResourcePool<int>*);
}
virtual void run() {
ResourcePool<int> pool;
}
};
BaseWriter<void> b;
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