Landing: 6791a54109c3

Project / Subsystem

gcc / c++

Date

2026-06-10

Author

Jakub Jelinek

Commit

6791a54109c33394a9ab5ef603cec5e8ecbd9953

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
c++
patch_id
commit_hash
6791a54109c33394a9ab5ef603cec5e8ecbd9953
source_type
github
headline
`__PRETTY_FUNCTION__` now uses `cpp_translate_string` for encoding consistency.
tldr
GCC's C++ front end now uses `cpp_translate_string` for `__PRETTY_FUNCTION__` initializers, correctly handling string encoding without interpreting escape sequ…
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • c++
  • bugfix
  • encoding
  • language-feature
discussion_id_link
bugzilla_pr
date
2026-06-10T00:00:00.000Z

GCC’s C++ front end now uses cpp_translate_string instead of cpp_interpret_string when translating initializers for __PRETTY_FUNCTION__. Previously, cpp_interpret_string could incorrectly process escape sequences within the function name, leading to an old bug resurfacing. The new approach correctly handles character set re-encoding without unintended interpretation, ensuring __PRETTY_FUNCTION__ provides an accurate string representation of the function’s signature.