Landing: 72fba287f32b
Project / Subsystem
gcc / c++
Date
2026-07-31
Author
Jakub Jelinek
Commit
72fba287f32b4a86c55c24b475de891fc88de217
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++
- patch_id
- —
- commit_hash
- 72fba287f32b4a86c55c24b475de891fc88de217
- source_type
- github
- headline
- C++: Improve handling of return value checks in expansion statements
- tldr
- Fixes an ICE and improves diagnostic handling for return value checks in C++ expansion statements.
- author
- Jakub Jelinek
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • templates
- • compiler error
- • diagnostics
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-31T00:00:00.000Z
This commit addresses an Internal Compiler Error (ICE) and improves diagnostic messages related to return value checks within C++ expansion statements. Previously, the compiler would ICE when attempting to instantiate expansion statements with dependent return values. The fix defers the full evaluation of check_return_expr until the final instantiation of the expansion statement, preventing the ICE. It also ensures that diagnostics accurately reflect the situation when return values are dependent or when specializations are involved.