Landing: e8aa21caed8a

Project / Subsystem

gcc / c++

Date

2026-05-07

Author

Jakub Jelinek

Commit

e8aa21caed8a3c8b4b27d224a04296f008bcf3da

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
e8aa21caed8a3c8b4b27d224a04296f008bcf3da
source_type
github
headline
C++: Improve printing of REFLECT_EXPR in diagnostics.
tldr
Enhances REFLECT_EXPR printing in diagnostics to use C++ syntax where possible, improving readability.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • reflection
  • diagnostics
  • printing
discussion_id_link
bugzilla_pr
date
2026-05-07T00:00:00.000Z

This commit improves the printing of REFLECT_EXPR in C++ diagnostics to use more C++-like syntax, making the output more understandable. It attempts to use valid C++ syntax for REFLECT_BASE, REFLECT_PARM, REFLECT_DATA_MEMBER_SPEC, REFLECT_VALUE, and REFLECT_OBJECT. For annotations, it prints them as ^^[[=1]] because the IL doesn’t store the context of the attributes.