This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Why does layout_decl() clear the DECL_BIT_FIELD bit?
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 29 Jan 2002 07:08:23 +0000
- Subject: Re: Why does layout_decl() clear the DECL_BIT_FIELD bit?
- References: <4DE8C480-1474-11D6-B1F6-0030658361CA@apple.com>
Ziemowit Laski wrote:-
> Hi all,
>
> The Objective-C front-end has a problem with bitfield instance
> variables whereby they occasionally get "promoted" to full-blown
> integers. This problem probably has been around "forever", but
> I'm happy to report that I (believe I) have a fix and will
> submit a patch as soon as I have time. :)
>
> However, to make ObjC bitfields work, I had to conditionally
> disable the two
>
> DECL_BIT_FIELD (decl) = 0;
>
> statements in the layout_decl() function (file stor-layout.c).
> My question is, are these statements really necessary in the
> first place? I understand the some bitfields are laid out
> just like integral types; however, is it really necessary for
> the DECL_BIT_FIELD flag to be cleared in such cases? The ObjC
> front-end really, really needs this flag. :)
Have you seen my bitfield patch awaiting approval?
It fixes bitfield promotion issues.
Neil.