Landing: da9cb50722ba

Project / Subsystem

gcc / c++

Date

2026-07-29

Author

Jason Merrill

Commit

da9cb50722ba0341bab9d0bf29d1cfa12be18f42

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
—
commit_hash
da9cb50722ba0341bab9d0bf29d1cfa12be18f42
source_type
github
headline
c++: Handle anonymous namespaces in module partitions correctly
tldr
Fixes an ICE in C++ module partitions by correctly handling anonymous namespaces local to a translation unit.
author
Jason Merrill
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • c++
  • • modules
  • • namespace
  • • ICE
  • • bugfix
discussion_id_link
—
bugzilla_pr
—
date
2026-07-29T00:00:00.000Z

This commit resolves an ICE (Internal Compiler Error) related to C++ module partitions and anonymous namespaces. Previously, the compiler incorrectly included anonymous namespaces from other partitions, leading to duplicate definitions and compilation failures. The fix prevents anonymous namespaces, which are local to a translation unit, from being forced out into module partitions, thereby resolving conflicts and enabling correct compilation.