Landing: 1801e9f04231
Project / Subsystem
gcc / c++/reflection
Date
2026-10-02
Author
Marek Polacek
Commit
1801e9f042319e934045f3d4aaaa3ba40e22d017
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++/reflection
- patch_id
- —
- commit_hash
- 1801e9f042319e934045f3d4aaaa3ba40e22d017
- source_type
- github
- headline
- c++/reflection: Correct error for block-scope using [:ns:]::S.
- tldr
- Fixes a bogus error when using dependent namespaces with C++ reflection in block scopes.
- author
- Marek Polacek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • compiler
- • reflection
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-10-02T00:00:00.000Z
This commit corrects an erroneous error message in C++ reflection when using dependent namespaces within a block scope, such as using [:ns:]::S; where ns is dependent. Previously, the compiler incorrectly reported that :: was not a class, namespace, or enumeration. The fix ensures that tsubst_stmt correctly handles NAMESPACE_DECL for dependent namespaces, which is necessary following the introduction of P2996.