Landing: 9d5c276dfb5f
Project / Subsystem
gcc / c++/reflection
Date
2026-05-13
Author
chzn@mail.ustc.edu.cn
Commit
9d5c276dfb5f5812e0fa7b46e84beaca36295c6d
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++/reflection
- patch_id
- —
- commit_hash
- 9d5c276dfb5f5812e0fa7b46e84beaca36295c6d
- source_type
- github
- headline
- c++/reflection: Reject invalid annotation on class [PR123609]
- tldr
- The C++ compiler now rejects invalid attributes on class declarations, improving error reporting.
- author
- chzn@mail.ustc.edu.cn
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • reflection
- • attributes
- • error handling
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-13T00:00:00.000Z
This commit fixes an issue where the C++ compiler ignored certain errors when parsing attributes on class declarations due to tentative parsing. Now the compiler re-parses attributes that previously caused a tentative parsing failure, ensuring that invalid attributes are rejected and appropriate errors are reported. This change improves the robustness of the compiler’s error handling and provides more informative diagnostics to the user.