On 7/30/12, Ali Çehreli <acehr...@yahoo.com> wrote: > It is inherently unportable because unlike D, bitfields in C and C++ > give too much freedom to the compiler. The compiler can move the fields > around at will.
I really need to figure out a reliable way to extract this information, at least for the target platform a library is compiled on. gccxml gives some information which seems to be somewhat reliable but according to the authors it's more of a guess than accurate info (2nd paragraph): http://www.gccxml.org/pipermail/gccxml/2012-February/001483.html Still this isn't too shabby, there could be configuration options where the user could set pack/bitsize/compiler options and similar stuff which would make a codegenerator more reliable.