Landing: 7802275c29d3

Project / Subsystem

gcc / c++/modules+reflection

Date

2026-04-29

Author

Patrick Palka

Commit

7802275c29d3c301c6f168ef1098a38494a0e836

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++/modules+reflection
patch_id
commit_hash
7802275c29d3c301c6f168ef1098a38494a0e836
source_type
github
headline
C++ Modules: Handle typedef struct { } A with reflection
tldr
Fixes module merging for typedefs to unnamed types when reflection is enabled.
author
Patrick Palka
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • modules
  • reflection
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-04-29T00:00:00.000Z

GCC’s C++ module merging had issues with typedefs to unnamed types (e.g., typedef struct { } A) when reflection was enabled. A recent change modified the representation of such typedefs, and this patch updates the module merging logic to handle this new representation correctly. This ensures that the unnamed decl is properly handled, even though it isn’t visible to name lookup, resolving a merge failure. New test cases are added.