This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.


On 8/29/19 2:37 AM, Martin Liška wrote:
On 8/28/19 10:19 PM, Jason Merrill wrote:
On 8/28/19 12:29 PM, Martin Liška wrote:
The patch restores behavior before r265711 where we used
cxx_printable_name for __PRETTY_FUNCTION__.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/c-family/ChangeLog:

2019-08-27  Martin Liska  <mliska@suse.cz>

      PR c++/91155
      * c-common.c (fname_as_string): Use cxx_printable_name for
      __PRETTY_FUNCTION__ same as was used before r265711.

-  if (name)
-    free (CONST_CAST (char *, name));

This creates a memory leak for the fname_as_string case.

Jason


Sure, fixed in the updated patch.

OK.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]