[GCC-XML]Support for bit fields inside structures

Brad King brad.king at kitware.com
Mon Dec 1 18:09:04 EST 2003


On Mon, 1 Dec 2003, Gilles Charron wrote:

>      there were discussions on this list about supporting bit fields
> inside structures.  Just wondering at what stage this is and what time
> frame it will be available since there have been no release of GCCXML in
> over a year now.

Thanks for the ping on this issue.  I was hesitant to implement the
feature before because bitfield sizes may be expressions.  However, I've
implemented the feature in CVS using a slightly modified version of code
sent to me by Wilfried Munz.  This will work when the bit field size is an
integer literal or simple expression, which will catch 99% of cases.

If a Field is a bitfield, it will contain a bits="x" attribute, where x is
the field size in bits.  If the size is not a simple expression, it will
be reported as 0 (this should almost never happen).

There are plans for another release within a few months, but no specific
timeframe has been set.

-Brad




More information about the gccxml mailing list