summaryrefslogtreecommitdiffstats
path: root/gcc/cp/rtti.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-14 20:21:34 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-14 20:21:34 +0000
commitaf52226989a3a564863f9c212c521dc1bc6c635a (patch)
tree230c443a411d1722b106ee65843f01d2158bdb82 /gcc/cp/rtti.c
parent1db6d067165107f696c323aaf76e74739b800804 (diff)
downloadppe42-gcc-af52226989a3a564863f9c212c521dc1bc6c635a.tar.gz
ppe42-gcc-af52226989a3a564863f9c212c521dc1bc6c635a.zip
/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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124724 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/rtti.c')
-rw-r--r--gcc/cp/rtti.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 121699f669d..1891f3b4833 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -238,7 +238,7 @@ get_tinfo_decl_dynamic (tree exp)
/* 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)
@@ -431,7 +431,7 @@ get_typeid (tree 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)
OpenPOWER on IntegriCloud