Landing: b554e3e64368

Project / Subsystem

gcc / gcc

Date

2026-05-30

Author

Jakub Jelinek

Commit

b554e3e64368c734e6e47c708fa7dde4096775c6

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
b554e3e64368c734e6e47c708fa7dde4096775c6
source_type
github
headline
C: Implement bit-precise enums as specified in C2Y N3705
tldr
This commit implements bit-precise enums as defined in C2Y N3705.
author
Jakub Jelinek
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • c
  • c2y
  • enums
  • bitint
discussion_id_link
bugzilla_pr
date
2026-05-30T00:00:00.000Z

This commit implements the bit-precise enum feature from the C2Y draft standard (N3705). It enables the use of _BitInt(N) types as the underlying type for enums when compiling with -std=c2y or -std=gnu2y. The implementation adjusts the BITINT_TYPE_P macro and modifies related code to handle enums with bit-precise underlying types seamlessly, including conversions and bit-field promotions.