Skip to content

Conversation

@tshepang
Copy link
Member

@tshepang tshepang commented Dec 4, 2025

Closes #624

@tshepang
Copy link
Member Author

tshepang commented Dec 4, 2025

started a Zulip topic

@tshepang tshepang marked this pull request as draft December 4, 2025 20:43
@tshepang tshepang marked this pull request as ready for review December 10, 2025 12:27
Copy link
Contributor

@kirtchev-adacore kirtchev-adacore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just the alphabetization.

:dp:`fls_o4uSLPo00KUg`
A :dt:`variadic ABI` is any of the following :t:`[ABI]s`:

* :dp:`fls_OR85NVifPwjr`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you alphabetize the entries in this list?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@kirtchev-adacore kirtchev-adacore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

This avoids defining a new term, and instead follows Rust Reference
@tshepang
Copy link
Member Author

it felt better to define variadic function instead of creating a new term, variadic ABI (275e8a1)... what you think @kirtchev-adacore (cc @traviscross)

Comment on lines 111 to 134
A :t:`variadic function` can only be used with one of the following :t:`[ABI]s`:

* :dp:`fls_OR85NVifPwjr`
``extern "C"``
* :dp:`fls_4s2IdfYDzPrX`
``extern "C-unwind"``
* :dp:`fls_ZJJppPfiJRou`
``extern "aapcs"``
* :dp:`fls_jOyZh9ujWWHQ`
``extern "aapcs-unwind"``
* :dp:`fls_Xdr0bFwxhWiB`
``extern "cdecl"``
* :dp:`fls_DpTFEHZAABdD`
``extern "cdecl-unwind"``
* :dp:`fls_b7FTlWfnX2OI`
``extern "efiapi"``
* :dp:`fls_eHPWHrvs7ETl`
``extern "sysv64"``
* :dp:`fls_mjCrvmikm58M`
``extern "sysv64-unwind"``
* :dp:`fls_4EUb9zFatZ97`
``extern "win64"``
* :dp:`fls_4B4B5FIqAes9`
``extern "win64-unwind"``
Copy link
Contributor

@traviscross traviscross Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extern "system" / extern "system-unwind"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@traviscross traviscross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the question about extern "system", this looks good to me.

@tshepang
Copy link
Member Author

tshepang commented Dec 14, 2025

Would like to, in future, use AbiKind, which is defined as the "C" in extern "C". This will also help, in future, if we move to edition 2024, which requires unsafe be specified (like unsafe extern "C").

@kirtchev-adacore
Copy link
Contributor

it felt better to define variadic function instead of creating a new term, variadic ABI (275e8a1)... what you think @kirtchev-adacore (cc @traviscross)

I like it! I left a minor suggestion for Tshepang.

from review
> Since it is the job of the programmer to ensure proper ABI use, the rule must be stated as a requirement ("shall", "must", etc).

Co-authored-by: Hristian Kirtchev <60669983+kirtchev-adacore@users.noreply.github.com>
Co-authored-by: Hristian Kirtchev <60669983+kirtchev-adacore@users.noreply.github.com>
@kirtchev-adacore kirtchev-adacore added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main with commit 8c63fe1 Dec 15, 2025
3 checks passed
@kirtchev-adacore kirtchev-adacore deleted the issue-624 branch December 15, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Change]: [1.91.0, 1.91.1] Stabilize declaration of C-style variadic functions for 'sysv64', 'win64', 'efiapi', and 'aapcs' ABIs

3 participants