[foreign] RFR 8217784: Ignore anonymous bitfields so they are handled as padding
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri Jan 25 18:25:35 UTC 2019
Looks good - but what happens with unions? I'm worried we'd get a
similar failure there...
Maurizio
On 25/01/2019 13:52, Jorn Vernee wrote:
> Hi,
>
> From the bug description:
>
> Jextract fails on the following example:
>
> ```
> struct Foo {
> unsigned int x: 1;
> int :7;
> unsigned int y: 8;
> int :16;
> int z;
> };
> ```
>
> The current code tries to look up the second field, but because it has
> no name this throws an illegal field name error.
>
> ---
>
> I've fixed this by ignoring anonymous bitfields, since the
> StructLayoutComputer inserts padding automatically before the next field.
>
> Please review the following.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8217784
> Webrev:
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/8217784/webrev.00/
>
> Thanks,
> Jorn
More information about the panama-dev
mailing list