[foreign-memaccess+abi] Integrated: 8312059: Clarify the documention for variadic functions
Jorn Vernee
jvernee at openjdk.org
Fri Jul 14 18:07:21 UTC 2023
On Thu, 13 Jul 2023 21:53:03 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> This patch attempts to refine the javadoc for variadic functions further. Particularly, it tries to make it clearer that the layouts the native linker rejects are derived from the C specification. Instead of trying to say which layouts are reject, we say which C types are rejected, and then give a hint about how to map those C types into layouts, using `canonicalLayouts()`, which would tell a client which layouts are rejected.
>
> Additionally, this patch removes the mentions of prototype-less functions, which are not considered variadic functions in C. It is also not clear whether arguments passed to such a function should be treated as variadic or not in the ABI (see linked issue). Finally the latest C standard, C23, prototype-less functions no longer exist, and a declaration of the form `void foo()` instead means the same as `void foo(void)`. For these reason, passing arguments to prototype-less functions will also not be supported (officially) by the linker. I wasn't sure about whether to add a specific note about that. I figured that just not saying they are supported, combined with the state of the latest C standard, would make this obvious enough (?).
This pull request has now been integrated.
Changeset: a83f43d2
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/a83f43d285a85aa2eb603441f6088f50ce7f6ae9
Stats: 20 lines in 1 file changed: 2 ins; 5 del; 13 mod
8312059: Clarify the documention for variadic functions
8310646: Javadoc around prototype-less functions might be incorrect
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/panama-foreign/pull/846
More information about the panama-dev
mailing list