Landing: 654eb1f70643
Project / Subsystem
gcc / c++
Date
2026-08-11
Author
Jason Merrill
Commit
654eb1f70643a2c57b3c6a31c250c1213a23aa4f
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++
- patch_id
- —
- commit_hash
- 654eb1f70643a2c57b3c6a31c250c1213a23aa4f
- source_type
- github
- headline
- C++: Avoid TARGET_EXPR for constexpr class access in generic lambdas
- tldr
- Improves constexpr evaluation in templates by preventing unnecessary internal expression wrappers.
- author
- Jason Merrill
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • compiler
- • templates
- • constexpr
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-11T00:00:00.000Z
This change prevents the C++ compiler from using TARGET_EXPR to represent constexpr class values within template declarations. TARGET_EXPR is an internal implementation detail and not suitable for template code. By avoiding this wrapper when processing template declarations, the compiler ensures a cleaner representation of constant expressions, aligning with the goals of constexpr evaluation in templates.