This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] support static nested constructors in bitfields
- From: Olivier Hainque <hainque at adacore dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, hainque at adacore dot com
- Date: Mon, 1 Jun 2009 09:26:48 +0200
- Subject: Re: [PATCH] support static nested constructors in bitfields
- References: <20090427103204.GA29582@cardhu.act-europe.fr> <email@example.com> <20090527130727.GA19956@cardhu.act-europe.fr> <firstname.lastname@example.org>
Ian Lance Taylor wrote:
> > are these fine or do you prefer an explicit '!= NULL_TREE' added ?
> Either approach is acceptable. I personally prefer the explicit !=
> NULL_TREE, but certainly many others disagree. There is no need to add
> it where it is not present.
> > + /* True if NODE, a FIELD_DECL, is to be processed as a bitfield for
> > + constructor output purposes. */
> > + #define CONSTRUCTOR_BITFIELD_P(NODE) \
> > + ((DECL_BIT_FIELD (FIELD_DECL_CHECK (NODE)) && DECL_MODE (NODE) != BLKmode))
> You have double parentheses around the whole expression; drop the outer
> > ! && (local.field == 0 || !CONSTRUCTOR_BITFIELD_P (local.field)))
> > output_constructor_regular_field (&local);
> > /* For a true bitfield or part of an outer one. */
Sure. This was extracted and ~ adjusted from what we had before your
> This is OK.
Thanks much for your feedback,