Landing: 5adfaf6a4f94
Project / Subsystem
gcc / gccrs
Date
2026-08-15
Author
Philip Herron
Commit
5adfaf6a4f94913a0833250a428e5c37e55d46fd
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gccrs
- patch_id
- —
- commit_hash
- 5adfaf6a4f94913a0833250a428e5c37e55d46fd
- source_type
- github
- headline
- gccrs: Add maybe fold reference to constexpr from cp/constcexpr.cc
- tldr
- gccrs integrates constexpr evaluation by porting reference folding logic from C++ frontend.
- author
- Philip Herron
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gccrs
- • constexpr
- • constant evaluation
- • rust
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-15T00:00:00.000Z
This commit brings maybe_fold_reference_address_to_pointer and related logic from GCC’s C++ frontend (cp/constcexpr.cc) into gccrs. This integration is crucial for evaluating constant expressions (constexpr) in Rust, particularly by enabling the correct handling of references to addresses within these constant evaluations. The change aims to improve constexpr support and resolve issues related to constant expression evaluation.