[cfe-dev] patch: boolean bitfield init
Chris Lattner
clattner at apple.com
Thu Jul 17 10:55:04 PDT 2008
On Jul 17, 2008, at 10:50 AM, Daniel Dunbar wrote:
> This is a quick fix for initialization of _Bool bit-fields which
> have width > 1 (<rdar://problem/6078606>), as in:
> --
> struct {
> _Bool a : 8;
> int b : 9;
> } x = { 1, 0 };
> --
>
> This allows test-suite/SingleSource/UnitTests/2006-01-23-
> InitializedBitField.c to build.
Hey Daniel,
Just to clarify, what is the problem here? There are two different
"get type size" predicates on ASTContext, one that returns _Bool as
having size of 1 bit, and one that returns size of 8 bits (on
x86-32). Is it possible the code is using the wrong one?
-Chris
More information about the cfe-dev
mailing list