Landing: b4edbe6ff339
Project / Subsystem
gcc / c++/modules
Date
2026-05-01
Author
Patrick Palka
Commit
b4edbe6ff3393733c0bbe9717e0f5abd6775e5d3
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- c++/modules
- patch_id
- —
- commit_hash
- b4edbe6ff3393733c0bbe9717e0f5abd6775e5d3
- source_type
- github
- headline
- C++/modules: Handle noexcept and deduced auto when merging functions.
- tldr
- Fixes a return type issue when merging functions with instantiated noexcept specifiers and deduced return types in C++ modules.
- author
- Patrick Palka
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • c++
- • modules
- • noexcept
- • return type deduction
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-01T00:00:00.000Z
When merging functions from streamed-in C++ modules with in-TU (translation unit) versions, GCC can prematurely update the return type, leading to issues with deduced return type checks. This patch narrowly propagates the instantiated noexcept specifier using build_exception_variant and ensures the function type isn’t stale during updates. This fixes PR125115.