RFR: allow empty group layout

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Jun 6 16:56:21 UTC 2018


Looks good

Maurizio


On 06/06/18 16:53, Henry Jen wrote:
> Hi,
>
> Please review another tweak[1] on DescriptorParser to allow empty group layout, this could happen with empty struct or union, although that’s not valid C and I doubt anyone would actually wrote that code.
>
> However, this is valid in C++ and some C compiler seems to allow it[2], so we should probably be OK with it. This StackOverflow entry[3] has some interesting links regarding empty struct.
>
> Cheers,
> Henry
>
> [1] http://cr.openjdk.java.net/~henryjen/panama/foreign/emptyStruct/webrev/
> [2] https://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html
> [3] https://stackoverflow.com/questions/3849334/sizeof-empty-structure-is-0-in-c-and-1-in-c-why
>
>



More information about the panama-dev mailing list