Landing: 392f10be00ec

Project / Subsystem

gcc / c++

Date

2026-05-19

Author

Jason Merrill

Commit

392f10be00ec19d1660d5f56edb26dc7aeb22586

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
392f10be00ec19d1660d5f56edb26dc7aeb22586
source_type
github
headline
Another constexpr empty class tweak
tldr
Improved constexpr handling for empty class types by checking for empty fields during subobject initialization.
author
Jason Merrill
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • constexpr
  • optimization
discussion_id_link
bugzilla_pr
date
2026-05-19T00:00:00.000Z

This commit optimizes the handling of constexpr (compile-time constant) empty classes by refining the conditions for omitting subobject constructors. It now checks for empty fields, preventing unnecessary constructor omission for non-potentially-overlapping fields of empty class types. This tweak improves code generation efficiency for constexpr contexts involving empty classes.