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

2023-06-06 Thread Maurizio Cimadamore
On Tue, 6 Jun 2023 15:17:26 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 [v6]

2023-06-02 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

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

2023-06-02 Thread Jorn Vernee
On Thu, 1 Jun 2023 15:28:33 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 [v5]

2023-06-02 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

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

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 15:28:33 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 [v3]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 15:16:42 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 [v3]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 15:19:48 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework javadoc > > src/java.base/share/classes/java/lang/foreign/Linker.java line 373: > >> 371: * With an

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

2023-06-01 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

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 [v3]

2023-06-01 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

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

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters

2023-05-31 Thread Jorn Vernee
On Wed, 31 May 2023 15:39:54 GMT, Maurizio Cimadamore wrote: >> test/jdk/java/foreign/StdLibTest.java line 386: >> >>> 384: return arena.allocateUtf8String("str"); >>> 385: }, "str"), >>> 386: CHAR(int.class, C_INT, "%c", arena -> (int) 'h', (int) 'h'), >>> //

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters

2023-05-31 Thread Maurizio Cimadamore
On Tue, 30 May 2023 17:25:35 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

2023-05-31 Thread Maurizio Cimadamore
On Wed, 31 May 2023 15:39:31 GMT, Maurizio Cimadamore 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. >>

RFR: 8308031: Linkers should reject unpromoted variadic parameters

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 used as