Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-12 Thread Martin Sebor via Gcc-patches
On 2/12/21 12:36 PM, Richard Biener wrote: On February 12, 2021 7:21:25 PM GMT+01:00, Martin Sebor wrote: On 2/12/21 12:35 AM, Richard Biener wrote: On Thu, Feb 11, 2021 at 7:35 PM Martin Sebor wrote: On 2/11/21 12:59 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor

Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-12 Thread Richard Biener via Gcc-patches
On February 12, 2021 7:21:25 PM GMT+01:00, Martin Sebor wrote: >On 2/12/21 12:35 AM, Richard Biener wrote: >> On Thu, Feb 11, 2021 at 7:35 PM Martin Sebor >wrote: >>> >>> On 2/11/21 12:59 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor >wrote: > > The attache

Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-12 Thread Martin Sebor via Gcc-patches
On 2/12/21 12:35 AM, Richard Biener wrote: On Thu, Feb 11, 2021 at 7:35 PM Martin Sebor wrote: On 2/11/21 12:59 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: The attached patch replaces calls to print_generic_expr_to_str() with a helper function that returns

Re: Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-11 Thread Richard Biener via Gcc-patches
On Thu, Feb 11, 2021 at 7:35 PM Martin Sebor wrote: > > On 2/11/21 12:59 AM, Richard Biener wrote: > > On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: > >> > >> The attached patch replaces calls to print_generic_expr_to_str() with > >> a helper function that returns a std::string and releases

Fwd: Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-11 Thread Martin Sebor via Gcc-patches
On 2/11/21 12:59 AM, Richard Biener wrote: On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: The attached patch replaces calls to print_generic_expr_to_str() with a helper function that returns a std::string and releases the caller from the responsibility to explicitly free memory. I don't

Re: [PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-10 Thread Richard Biener via Gcc-patches
On Wed, Feb 10, 2021 at 6:16 PM Martin Sebor wrote: > > The attached patch replaces calls to print_generic_expr_to_str() with > a helper function that returns a std::string and releases the caller > from the responsibility to explicitly free memory. I don't like this. What's the reason to use ge

[PATCH] plug memory leaks in warn_parm_array_mismatch (PR 99055)

2021-02-10 Thread Martin Sebor via Gcc-patches
The attached patch replaces calls to print_generic_expr_to_str() with a helper function that returns a std::string and releases the caller from the responsibility to explicitly free memory. With the patch installed, Valgrind shows more leaks in this code that I'm not sure what to do about: 1) A