Landing: 787d1973b7e5
Project / Subsystem
gcc / libstdc++
Date
2026-10-05
Author
Jonathan Wakely
Commit
787d1973b7e5fef891ad2ba66fe6489ff6fcbafd
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 787d1973b7e5fef891ad2ba66fe6489ff6fcbafd
- source_type
- github
- headline
- libstdc++: Use format gnu_printf attribute only for C++11 and later
- tldr
- Avoids pedantic warnings by conditionally applying gnu_printf attribute for C++11 and later.
- author
- Jonathan Wakely
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • c++11
- • warnings
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-10-05T00:00:00.000Z
The libstdc++ library now conditionally applies the gnu_printf attribute for C++11 and later. This change prevents pedantic warnings in C++98 code that would arise from using %zu format specifiers in internal error message formatting functions. The attribute is now only enabled when the C++ language dialect supports it, simplifying the code and avoiding unnecessary warnings.