This is the mail archive of the
gcc-patches@gcc.gnu.org
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> <m38wkkvsre.fsf@google.com> <20090527130727.GA19956@cardhu.act-europe.fr> <m3eiu4bn97.fsf@google.com>
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.
Understood.
> > + /* 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
> ones.
OK.
> > ! && (local.field == 0 || !CONSTRUCTOR_BITFIELD_P (local.field)))
> > output_constructor_regular_field (&local);
>
> > /* For a true bitfield or part of an outer one. */
>
> S/0/NULL_TREE/
Sure. This was extracted and ~ adjusted from what we had before your
first review.
> This is OK.
Thanks much for your feedback,
Olivier