Landing: 7199cf12773b

Project / Subsystem

gcc / c++/reflection

Date

2026-05-07

Author

Marek Polacek

Commit

7199cf12773b1429c19cdd5b69950b2f09470e64

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++/reflection
patch_id
commit_hash
7199cf12773b1429c19cdd5b69950b2f09470e64
source_type
github
headline
C++/reflection: Fixes for comparing reflections [PR125208]
tldr
Fixes bugs in comparing C++ reflections, including a crash and incorrect alias comparison.
author
Marek Polacek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • reflection
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

This commit fixes two bugs in the C++ reflection implementation related to comparing reflections. The first bug was a crash in cp_tree_equal when comparing reflections with binfos. The second bug was in compare_reflections when comparing two aliases, where it incorrectly fell back to same_type_p. The fix ensures that comparing aliases correctly distinguishes between them.