OSDN Git Service

* typeck2.c (process_init_constructor): Only skip anonymous fields
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Oct 1998 02:35:21 +0000 (02:35 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Oct 1998 02:35:21 +0000 (02:35 +0000)
if they are bitfields.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23347 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 9bffbed..dd9fbe7 100644 (file)
@@ -1,5 +1,8 @@
 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * typeck2.c (process_init_constructor): Only skip anonymous fields
+       if they are bitfields.
+
        * cp-tree.def (TYPEOF_TYPE): New code.
        * error.c (dump_type_real): Handle it.
        * pt.c (tsubst): Likewise.
@@ -18,7 +21,7 @@
        specially.
 
        * init.c (build_member_call): Don't try to convert to the base type
-       if it's ambiguous.
+       if it's ambiguous or pedantic.
 
        * typeck2.c (check_for_new_type): Only depend on pedantic for
        C-style casts.
index fc05514..7ab48ee 100644 (file)
@@ -1043,7 +1043,7 @@ process_init_constructor (type, init, elts)
        {
          register tree next1;
 
-         if (! DECL_NAME (field))
+         if (! DECL_NAME (field) && DECL_C_BIT_FIELD (field))
            {
              members = expr_tree_cons (field, integer_zero_node, members);
              continue;