Landing: 4569067c6f52

Project / Subsystem

gcc / c++

Date

2026-08-01

Author

Jason Merrill

Commit

4569067c6f5206e97a319ec6bfa4e3446b3a41d1

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
4569067c6f5206e97a319ec6bfa4e3446b3a41d1
source_type
github
headline
Handle constructor default arguments with early DMI
tldr
Fixes an issue with default member initialization in C++ constructors when using early parsing.
author
Jason Merrill
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • parser
  • • constructor
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-01T00:00:00.000Z

This commit addresses a bug in C++ parsing related to default member initialization within constructors. Previously, the parser incorrectly handled cases involving default member initializers for class-type members when performing early parsing. The fix modifies the parser to correctly check for MAYBE_CLASS_TYPE_P instead of an empty initializer list, ensuring proper handling of these constructs. A new test case validates the correction.