From c8c133cd3bfc3a733aa81ddfb4a35fd4d7636aea Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Mon, 26 Oct 1998 02:35:21 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 ++++- gcc/cp/typeck2.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9bffbed91ed..dd9fbe71121 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1998-10-26 Jason Merrill + * 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 fc055149580..7ab48ee56a6 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; -- 2.30.2