RFR: allow empty group layout

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Thu Jun 7 02:33:40 UTC 2018


Looks good

-Sundar

On 06/06/18, 9:23 PM, 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