]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
typeck2.c (process_init_constructor_union): Remove check for unnamed union members.
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Fri, 25 Nov 2005 12:52:12 +0000 (12:52 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Fri, 25 Nov 2005 12:52:12 +0000 (12:52 +0000)
* typeck2.c (process_init_constructor_union): Remove check for
unnamed union members.

From-SVN: r107501

gcc/cp/ChangeLog
gcc/cp/typeck2.c

index 865e5b7c9bff6abfb9330f97098d190a04b7079f..d97fe45359ec9a8d630e10dfdc58b61ce3a1cfd9 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
+
+       * typeck2.c (process_init_constructor_union): Remove check for
+       unnamed union members.
+
 2005-11-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
 
        * name-lookup.c (lookup_name_real): Merge two if's.
index 42520e2f76779e4c7f895ad0881841b5361205a6..3fb80cad1013c97e64b0ac96a5745cc9f3bd56fa 100644 (file)
@@ -993,12 +993,7 @@ process_init_constructor_union (tree type, tree init)
       tree field = TYPE_FIELDS (type);
       while (field && (!DECL_NAME (field) || TREE_CODE (field) != FIELD_DECL))
        field = TREE_CHAIN (field);
-      if (!field)
-       {
-         error ("union %qT with no named members cannot be initialized",
-                type);
-         ce->value = error_mark_node;
-       }
+      gcc_assert (field);
       ce->index = field;
     }