GCC Newspaper
JULY 29, 2026
gcc Proposed Sentiment 7 / 10

Draft C2Y _BitInt related proposals

Proposes additions to C2Y for _BitInt I/O support in printf/scanf and stdbit.h.

Jakub Jelinek has drafted proposals for C2Y, aiming to add support for _BitInt I/O with printf/scanf and extend stdbit.h functionality. The proposals are available as web links for community review and feedback.

In the Thread 4 participants
  1. Jakub Jelinek <jakub@redhat.com> proposer

    Proposes C2Y papers for _BitInt I/O support in printf/scanf and stdbit.h, seeking comments.

    “As I wrote earlier, I'd like to see _BitInt I/O support in *printf*/*scanf* and extending support of _BitInt in stdbit.h in C2Y. For those I wrote drafts of possible C2Y papers: https://jakubjelinek.github.io/wg14/va_arg_bitint.html https://jakubjelinek.github.io/wg14/stdbit_bitint.html”
  2. Joseph Myers <josmyers@redhat.com> reviewer

    Suggests that generic_limb_type should be unsigned, as signed types are not compatible with the described formats.

    “generic_limb_type should probably be required to be an unsigned type; the descriptions don't work with it as a signed type. Since the terminology was changed so that bool isn't counted as an unsigned”
  3. Jakub Jelinek <jakub@redhat.com> proposer

    Acknowledges Joseph Myers' comment on generic_limb_type and inquires about adding an exception for scanf's va_arg usage.

    “Would it be ok to add an exception for this in 7.16.2.2? I”
  4. Joseph Myers <josmyers@redhat.com> reviewer

    Responds to Jakub Jelinek's query about va_arg and scanf, referencing a specific section.

Technical Tradeoffs

  • Extending printf/scanf for _BitInt might complicate existing format string parsing and argument handling.
  • Ensuring _BitInt interoperability with stdbit.h requires careful definition of bit manipulation operations for arbitrary widths.

In Details

This discussion concerns proposals for the C2Y (C 202Y) standard, specifically integrating support for the _BitInt type. It involves standard C language evolution, focusing on I/O formatting for _BitInt via printf/scanf and its inclusion in the stdbit.h header. The core technical challenges likely revolve around type promotion, argument passing conventions (especially with va_arg), and ensuring consistent behavior across implementations.

For Context
_BitInt
A C language extension for arbitrary-precision integers, allowing for integer types of non-standard bit widths.
C2Y
Refers to the C language standard targeted for release in or around the year 202Y, representing the next iteration after C17/C23.
printf/scanf
Standard C library functions for formatted input and output. Adding support for _BitInt would require new format specifiers or extensions.
stdbit.h
A standard C header providing bit manipulation functions and types. Extending it for _BitInt would involve defining relevant operations and types.
va_arg
A macro used in C to access arguments passed to variadic functions (functions that accept a variable number of arguments), such as printf.
Filed Under: cstandardizationcompilerlanguage features