OSDN Git Service

* init.c (perform_member_init): Check CLASS_TYPE_P.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 28 Apr 2010 01:45:00 +0000 (01:45 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 04:53:10 +0000 (13:53 +0900)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158822 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/init.c

index 3935cc2..6d09c80 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-27  Jason Merrill  <jason@redhat.com>
+
+       * init.c (perform_member_init): Check CLASS_TYPE_P.
+
 2010-04-27  Fabien ChĂȘne  <fabien.chene@gmail.com>
 
        PR c++/29043
index 57b874d..5f0f665 100644 (file)
@@ -518,9 +518,11 @@ perform_member_init (tree member, tree init)
                       member, type);
 
          core_type = strip_array_types (type);
-         if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type)
-             || CLASSTYPE_REF_FIELDS_NEED_INIT (core_type))
-           diagnose_uninitialized_cst_or_ref_member (core_type, /*using_new=*/false);
+         if (CLASS_TYPE_P (core_type)
+             && (CLASSTYPE_READONLY_FIELDS_NEED_INIT (core_type)
+                 || CLASSTYPE_REF_FIELDS_NEED_INIT (core_type)))
+           diagnose_uninitialized_cst_or_ref_member (core_type,
+                                                     /*using_new=*/false);
        }
       else if (TREE_CODE (init) == TREE_LIST)
        /* There was an explicit member initialization.  Do some work