Skip to content

Tracking Issue for c_variadic_int128 #155752

@folkertdev

Description

@folkertdev

Feature gate: #![feature(c_variadic_int128)]

This is a tracking issue for the VaArgSafe implementations on 128-bit integers.

These implementations are only available on targets where clang defines __int128.

GCC does not implement __int128 for any 16-bit/32-bit target:

https://gcc.gnu.org/onlinedocs/gcc-15.2.0/gcc/_005f_005fint128.html

There is no support in GCC for expressing an integer constant of type __int128 for targets
with long long integer less than 128 bits wide.

Per https://learn.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=msvc-170, MSVC does not
define __int128.

Clang is slightly more permissive: it defines __int128 on wasm32 (a 32-bit target) and also
does provide __int128 on 64-bit *-pc-windows-msvc, and we follow suit.

Public API

unsafe impl VaArgSafe for i128 {}
unsafe impl VaArgSafe for u128 {}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • Do we support 128-bit integers on the right targets?

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions