https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91155
--- Comment #17 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:6791a54109c33394a9ab5ef603cec5e8ecbd9953 commit r17-1479-g6791a54109c33394a9ab5ef603cec5e8ecbd9953 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]>
