rust-lang / rust-lang/rust

Tracking Issue for `c_variadic_int128`

Open
#155,752 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

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 {}
Known issues
Steps / History

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

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the implementation in Rust PR #155429 and the ACPish discussion linked in issue #44930. Resolve the question of which targets support 128-bit integers, then follow the FCP and stabilization checklist; done means the target policy is settled and a stabilization PR is ready.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.