This is the mail archive of the gcc-bugs@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]

Why does layout_decl() clear the DECL_BIT_FIELD bit?


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. :)

Thanks,

--Zem
--------------------------------------------------------------
Ziemowit Laski                   Apple Computer, Inc.
zlaski@apple.com                 2 Infinite Loop, MS 302-4SN
+1.408.974.6229  Fax .1344       Cupertino, CA  95014-2085


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