This is the mail archive of the gcc-patches@gcc.gnu.org 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: Why does layout_decl() clear the DECL_BIT_FIELD bit?


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.


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