Landing: 21a88667c67d
Project / Subsystem
gcc / gcc/contracts
Date
2026-09-17
Author
Joshua Berne
Commit
21a88667c67ddf1f3086b7f05dc88601f1c6b070
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/contracts
- patch_id
- —
- commit_hash
- 21a88667c67ddf1f3086b7f05dc88601f1c6b070
- source_type
- github
- headline
- C++/Contracts: Assertion predicate re-invoking constexpr function [PR125459]
- tldr
- Fixes C++ contract assertions to correctly handle re-invoked constexpr functions during constant evaluation.
- author
- Joshua Berne
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • contracts
- • constexpr
- • compiler
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-17T00:00:00.000Z
This commit resolves an issue in GCC’s C++ contract implementation where re-invoking a constexpr function within a contract assertion or [[assume]] predicate during constant evaluation led to errors. The constexpr_global_ctx::put_value function has been updated to correctly handle void_list_node entries, preventing them from being treated as state modifications.