Landing: 50ba4a8ca7a5
Project / Subsystem
gcc / c++
Date
2026-06-12
Author
Jakub Jelinek
Commit
50ba4a8ca7a51a72514aae55d9fb81732ef7a3bd
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++
- patch_id
- —
- commit_hash
- 50ba4a8ca7a51a72514aae55d9fb81732ef7a3bd
- source_type
- github
- headline
- Diagnose invalid types for bitfield widths in templates
- tldr
- GCC's C++ front end now diagnoses invalid non-integral operand types for bit-field widths within templates, preventing later errors or ICEs.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • templates
- • diagnostics
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-12T00:00:00.000Z
GCC’s C++ compiler now flags incorrect non-integral types used specified for bit-field widths inside templates at the point of template instantiation. Previously, such errors might be missed until a later stage, leading to less precise diagnostics or even internal compiler errors (ICEs) when the type was problematic. This change replicates an existing check from grokbitfield during template substitution by tsubst_decl, ensuring earlier and more consistent error reporting for invalid bit-field specifications.