[PATCH] Use cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.

Jason Merrill jason@redhat.com
Wed Aug 28 21:14:00 GMT 2019


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



More information about the Gcc-patches mailing list