Landing: 672923ae0559
Project / Subsystem
gcc / gcc/analyzer
Date
2026-06-19
Author
Egas Ribeiro
Commit
672923ae05596d602c16f4bdb7449931c5e81cf5
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/analyzer
- patch_id
- —
- commit_hash
- 672923ae05596d602c16f4bdb7449931c5e81cf5
- source_type
- github
- headline
- Analyzer supports exception subclass matching.
- tldr
- GCC analyzer now correctly identifies caught exceptions that are derived classes of the caught type.
- author
- Egas Ribeiro
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • analyzer
- • exception handling
- • c++
- • static analysis
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-19T00:00:00.000Z
The static analyzer’s exception handling has been improved to correctly identify when a thrown exception, which is a derived class, is caught by a handler expecting a base class. This is achieved by introducing a new exception_matches_type_p langhook, implemented by the C++ frontend using can_convert_eh. This change ensures more accurate static analysis of exception flows.