This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Why does layout_decl() clear the DECL_BIT_FIELD bit?
- From: Ziemowit Laski <zlaski at apple dot com>
- To: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 28 Jan 2002 20:54:40 -0800
- Subject: 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