Landing: ef48b322cd98

Project / Subsystem

gcc / c++

Date

2026-05-07

Author

Jakub Jelinek

Commit

ef48b322cd98e23de57ad0d8f09ec02aa97d40c4

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
ef48b322cd98e23de57ad0d8f09ec02aa97d40c4
source_type
github
headline
C++ Reflection: Fixes Exception Handling in `extract_ref`
tldr
GCC now correctly throws exceptions in `extract_ref` when reflection encounters invalid array types, preventing internal compiler errors.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • reflection
  • exceptions
  • bugfix
  • compiler error
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

GCC now correctly throws an exception in the extract_ref function, a part of the C++ reflection implementation, when it encounters invalid array types (e.g., arrays of functions or methods). Previously, the code attempted to build arrays of these invalid types, leading to internal compiler errors (ICE). This fix ensures that the appropriate exception is thrown, providing more robust error handling during reflection.