https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91155
--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:d3ba71bb14c57c3b12ca433c99ba42b6421aa353 commit r16-9279-gd3ba71bb14c57c3b12ca433c99ba42b6421aa353 Author: Jakub Jelinek <[email protected]> Date: Wed Jun 10 22:41:48 2026 +0200 c++: Fix up __PRETTY_FUNCTION__ initializer translation [PR91155] In r16-4399 I've added reencoding of __PRETTY_FUNCTION__ initializer from the source character set to execution character set. I've used cpp_translate_string for that, which unfortunately interprets some escape sequences in the string, and as this testcase shows, those can appear in __PRETTY_FUNCTION__ and in this case made an old bug reappear. What didn't help is that the PR91155 testcase had a test for the exact values but with abort calls commented out and was dg-do compile only by default, so it actually didn't test anything. Since then for -freflection purposes cpp_translate_string has been added, and that doesn't interpret anything, only changes encoding (if needed). So, the following patch just uses that new function. 2026-06-10 Jakub Jelinek <[email protected]> PR c++/91155 * decl.cc (cp_make_fname_decl): Use cpp_translate_string instead of cpp_interpret_string, don't prefix name strname.text with " and suffix with " and NUL. * g++.dg/torture/pr91155.C: Change into dg-do run test, actually test the strings are the same. Reviewed-by: Jason Merrill <[email protected]> (cherry picked from commit 6791a54109c33394a9ab5ef603cec5e8ecbd9953)
