bitfields support in jextract

Samuel Audet samuel.audet at gmail.com
Sat Jun 30 07:26:39 UTC 2018


Hi,

Looks like the packing of bit fields is implementation dependent:
https://stackoverflow.com/questions/1490092/c-c-force-bit-field-order-and-alignment

Clang is probably using GCC's extensions by default, but you should be 
thinking about supporting at least MSVC! GCC seems to have support for 
that with TARGET_MS_BITFIELD_LAYOUT_P:
https://gcc.gnu.org/onlinedocs/gccint/Storage-Layout.html

Not sure about Clang though, nothing mentioned here:
https://clang.llvm.org/docs/MSVCCompatibility.html

So, again, the scope of Panama is very ill defined. It would help if you 
could define it better. In the case of bit fields, it sounds like you 
will not be supporting any other bit-field layout than GCC/Clang..

Samuel

On 06/30/2018 02:36 AM, Maurizio Cimadamore wrote:
> Hi,
> I'm sending this internally as an headsup...


More information about the panama-dev mailing list