Landing: d2b8724451f5

Project / Subsystem

gcc / c++

Date

2026-08-06

Author

Jakub Jelinek

Commit

d2b8724451f52a656d10f7d34f6a4e3d7602ed28

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
d2b8724451f52a656d10f7d34f6a4e3d7602ed28
source_type
github
headline
C++ `std::initializer_list` with bases now rejected.
tldr
Fixes a compiler ICE by rejecting `std::initializer_list` when declared with base classes.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • compiler bug
  • • type system
discussion_id_link
—
bugzilla_pr
—
date
2026-08-06T00:00:00.000Z

This commit addresses an issue where declaring std::initializer_list<T> with base classes could lead to an internal compiler error (ICE). Previously, the compiler only performed basic checks on this construct, such as verifying it was a class and not a union. The fix modifies the compiler to explicitly reject such declarations, preventing the ICE and ensuring correct type usage according to C++ standards.