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

Jorn Vernee jvernee at openjdk.org
Wed May 31 22:44:54 UTC 2023


On Wed, 31 May 2023 15:37:57 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> 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 be noted that values passed as variadic arguments undergo default argument promotion in C. Each value of
>> 414:  * type {@code float} is converted to {@code double}, and each integral type smaller than {@code int} is converted to
>> 415:  * {@code int}. As such, the native linker will reject attempts to link a function with variadic parameters which have
> 
> maybe "will reject attempts to link a variadic function if one or more parameter layouts in the provided function descriptor which correspond to a variadic argument is a value layout such that ..."

I did another pass over this. I went back to the first paragraph and defined the term "variadic argument layout" which I then use when explaining which layouts can not be used.

I've also moved the note to be directly after the first paragraph so that it appears closer to where the term is defined.

Hopefully there should be no gaps now.

P.S. I had to re-flow some of the lines in the doc, so they might appear changed in the diff.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14225#discussion_r1212384221


More information about the core-libs-dev mailing list