This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Do BLKmode bit-fields still exist?
> Isn't it enough to specify DECL_PACKED here? The tree.h docs
> about DECL_BIT_FIELD are a bit unspecific compared to
> DECL_PACKED.
>
> /* Nonzero in a FIELD_DECL means it is a bit field, and must be
> accessed specially. */
>
> vs.
>
> /* In a FIELD_DECL, indicates this field should be bit-packed. */
>
> where it seems, as your field isn't a bitfield, using DECL_PACKED
> looks more appropriate?
No, DECL_PACKED is an "input" flag for stor-layout.c, it isn't used in the
middle-end (except in the recently added contains_packed_reference but this
is wrong and should be fixed), the "output" flag that drives the middle-end
is DECL_BIT_FIELD. stor-layout.c attempts to clear the latter to improve the
code, it never changes the former.
--
Eric Botcazou