/cp
2007-05-14 Paolo Carlini <pcarlini@suse.de>
PR c++/29928
* rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
type only if is a class type (5.2.8/4).
/testsuite
2007-05-14 Paolo Carlini <pcarlini@suse.de>
PR c++/29928
* g++.dg/rtti/typeid5.C: New.
From-SVN: r124724
+2007-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/29928
+ * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
+ type only if is a class type (5.2.8/4).
+
2007-05-14 Rafael Avila de Espindola <espindola@google.com>
* cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
- if (!VOID_TYPE_P (type))
+ if (CLASS_TYPE_P (type))
type = complete_type_or_else (type, exp);
if (!type)
that is the operand of typeid are always ignored. */
type = TYPE_MAIN_VARIANT (type);
- if (!VOID_TYPE_P (type))
+ if (CLASS_TYPE_P (type))
type = complete_type_or_else (type, NULL_TREE);
if (!type)
+2007-05-14 Paolo Carlini <pcarlini@suse.de>
+
+ PR c++/29928
+ * g++.dg/rtti/typeid5.C: New.
+
2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/31725
--- /dev/null
+// PR c++/29928
+// { dg-do compile }
+
+#include <typeinfo>
+
+struct S;
+
+void f()
+{
+ const std::type_info& info1 = typeid(int []);
+ const std::type_info& info2 = typeid(S [3]);
+ const std::type_info& info3 = typeid(S []);
+}