This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] support static nested constructors in bitfields

Hello Ian,

Thanks much for your review and comments on these patches.

Two questions:

1/ > Test against NULL_TREE, not 0 (I know the existing code uses 0).

What about the cases where the comparison isn't explicit, for

      if (!outer
	  && local.index && TREE_CODE (local.index) == RANGE_EXPR)

are these fine or do you prefer an explicit '!= NULL_TREE' added ?

2/ For Ada, a piece of gigi needs a tight synchronization with one
of the internal predicates in output_constructor: the "is this a
true bitfield" part of

      /* Output the current element, using the appropriate helper ...  */
      /* For a field that is neither a true bitfield nor part of an outer one,
	 known to be at least byte aligned and multiple-of-bytes long.  */
        else if (!outer
               && (local.field == NULL_TREE
                   || !DECL_BIT_FIELD (local.field)
                   || DECL_MODE (local.field) == BLKmode))

We have the attached patchlet to help there.

        * tree.h (CONSTRUCTOR_BITFIELD_P): True if NODE, a FIELD_DECL, is
        to be processed as a bitfield for constructor output purposes.
        * varasm.c (output_constructor): Use it.

May I include this as well ?

Thanks for your feedback,


Attachment: oc-bitfieldp.dif
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]