Landing: ec2b5122e1f5

Project / Subsystem

gcc / c++

Date

2026-07-07

Author

Marek Polacek

Commit

ec2b5122e1f52409f7207539cc821424fa209ad7

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
ec2b5122e1f52409f7207539cc821424fa209ad7
source_type
github
headline
Fix C++ ICE with requires clauses and sequence point warning.
tldr
C++ compiler avoids internal compiler error when `requires` clauses are processed with `-Wsequence-point`.
author
Marek Polacek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • compiler bug
discussion_id_link
bugzilla_pr
date
2026-07-07T00:00:00.000Z

An Internal Compiler Error (ICE) in GCC’s C++ frontend has been fixed, which occurred when processing requires clauses in conjunction with the -Wsequence-point warning. The issue stemmed from the compiler attempting to analyze expressions within the requires clause as if they were evaluated in a standard context, leading to incorrect handling of a MODOP_EXPR. By marking REQUIRES_EXPR as ‘tcc_exceptional’, the compiler now correctly identifies these expressions as non-standard and avoids walking them in contexts where they are not expected, preventing the ICE.