Landing: 57ecb9897a09

Project / Subsystem

gcc / c++

Date

2026-07-17

Author

Jakub Jelinek

Commit

57ecb9897a096418ec3335bc0d18ec590e100396

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
57ecb9897a096418ec3335bc0d18ec590e100396
source_type
github
headline
c++: Implement C++29 P3424R2 deallocation functions ill-formed diagnostic
tldr
Implements a C++29 rule making deallocation functions with throwing exception specifications ill-formed.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • standard compliance
  • compiler
discussion_id_link
bugzilla_pr
date
2026-07-17T00:00:00.000Z

GCC now diagnostics deallocation functions with throwing exception specifications as ill-formed, implementing the C++29 rule P3424R2. This change affects functions like operator delete and operator delete[]. The compiler now checks for these cases during declaration parsing and instantiation in functions like grokfndecl, maybe_instantiate_noexcept, and cp_parser_class_specifier, with new tests added to verify the diagnostics for both C++29 and earlier standards.