[GCC-XML]support of bitfields

Brad King brad.king at kitware.com
Wed Sep 24 10:06:43 EDT 2003


> My Questions are:
> 1) Is it planned to support bitfields in the near future?
> 2) If not, can anyone give me some hints to do this by myself?

Bit-fields are tricky to dump because their size can be an expression in
GCC.  There is an implementation in progress, but it is part of a much
bigger set of changes that are not yet ready to be committed to CVS.

If you want to try it yourself in the meantime, look in xml.c for the
method xml_output_field_decl.  There is a comment there about the right
place to add bit-fields.  Then look in gcc/c-common.h and gcc/tree.h to
see how to detect bit-fields and get their size.  Specifically, look for
DECL_C_BIT_FIELD and DECL_SIZE.

-Brad




More information about the gccxml mailing list