Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-06-01 Thread Jorn Vernee
On Wed, 31 May 2023 23:57:01 GMT, Jorn Vernee wrote: >> Also, should we say somewhere that, for prototype-less functions, >> `firstVariadicArg` should always have an index of 0 (e.g. any other value is >> illegal, trivially). It's not super important, just one of those little >> things that

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Jorn Vernee
On Wed, 31 May 2023 23:41:25 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/java.base/share/classes/java/lang/foreign/Linker.java line 379: > >> 377: * type

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Jorn Vernee
On Wed, 31 May 2023 23:36:33 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 368: >> >>> 366: * Variadic functions >>> 367: * >>> 368: * Variadic functions (e.g. a C function declared with a trailing >>> ellipses {@code ...} at the end of

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Maurizio Cimadamore
On Wed, 31 May 2023 22:44:52 GMT, Jorn Vernee wrote: >> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and >> `float` is promoted to `double`, when being passed as variadic argument (see >> e.g. >>

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Maurizio Cimadamore
On Wed, 31 May 2023 23:35:08 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/java.base/share/classes/java/lang/foreign/Linker.java line 368: > >> 366: * Variadic

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Maurizio Cimadamore
On Wed, 31 May 2023 22:44:52 GMT, Jorn Vernee wrote: >> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and >> `float` is promoted to `double`, when being passed as variadic argument (see >> e.g. >>

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Jorn Vernee
On Wed, 31 May 2023 15:37:57 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> review comments > > src/java.base/share/classes/java/lang/foreign/Linker.java line 415: > >> 413: * It should

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-05-31 Thread Jorn Vernee
> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and > `float` is promoted to `double`, when being passed as variadic argument (see > e.g. > https://en.cppreference.com/w/c/language/conversion#Default_argument_promotions). > This patch restricts the layouts that can be