diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-26 02:35:21 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-25 21:35:21 -0500 |
commit | c8c133cd3bfc3a733aa81ddfb4a35fd4d7636aea (patch) | |
tree | a48341a9b122bc670c1af7e859eb3b330b5052a9 | |
parent | 813aedae9eaa7b6b49ae2e43bb4a4d0b45bce2db (diff) | |
download | gcc-c8c133cd3bfc3a733aa81ddfb4a35fd4d7636aea.zip gcc-c8c133cd3bfc3a733aa81ddfb4a35fd4d7636aea.tar.gz gcc-c8c133cd3bfc3a733aa81ddfb4a35fd4d7636aea.tar.bz2 |
typeck2.c (process_init_constructor): Only skip anonymous fields if they are bitfields.
* typeck2.c (process_init_constructor): Only skip anonymous fields
if they are bitfields.
From-SVN: r23347
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck2.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9bffbed..dd9fbe7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index fc05514..7ab48ee 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -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; |