typeck2.c (process_init_constructor): Only skip anonymous fields if they are bitfields.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 26 Oct 1998 02:35:21 +0000 (02:35 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 26 Oct 1998 02:35:21 +0000 (21:35 -0500)
* typeck2.c (process_init_constructor): Only skip anonymous fields
if they are bitfields.

From-SVN: r23347

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

index 9bffbed91edae6137ad4f984466bdebef939ca5a..dd9fbe711219cd81a7955f304e4a003ac2481e79 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 fc0551495800a477240a4980e36a2586c17a6e19..7ab48ee56a629f69d590cb479d51a7e0f7cea789 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;