Landing: 3f1821185398
Project / Subsystem
gcc / c++/reflection
Date
2026-09-12
Author
Marek Polacek
Commit
3f18211853985a2bedc1621c999c2ac97b184333
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++/reflection
- patch_id
- —
- commit_hash
- 3f18211853985a2bedc1621c999c2ac97b184333
- source_type
- github
- headline
- C++/reflection: Correct template lookup in spliced namespaces.
- tldr
- Fixes incorrect template lookup within spliced namespaces in C++ reflection.
- author
- Marek Polacek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • reflection
- • compiler
- • namespace
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-12T00:00:00.000Z
A bug in GCC’s C++ reflection implementation caused incorrect template lookups within spliced namespaces. The compiler would perform an unqualified lookup that searched enclosing namespaces instead of a qualified lookup restricted to the target namespace. This commit modifies the lookup mechanism to use lookup_qualified_name first, ensuring that template names are correctly resolved within the intended namespace.