https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119528

--- Comment #2 from akallabeth+gnu at posteo dot net ---
well, that it is not an actual use?

nigher free_foo nor create_foo (the function) are used anywhere in the 
code.

how do you consider deprecating a function helpful if every deprecation 
produces a false positive on every header include?

as for your suggestion, this will fail as the function designated 
deallocator has not been declared...

On 3/29/25 13:10, jakub at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119528
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |jakub at gcc dot gnu.org
> 
> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> You use the deprecated function in the attribute argument, how is that
> different from any other uses?
> If you don't want warning for that case, do
> void free_foo(FOO* var);
> __attribute__((deprecated("deprecated")) __attribute__((malloc(free_foo, 1)))
> FOO* create_foo(void);
> __attribute__((deprecated("deprecated")) void free_foo(FOO* var);
>

Reply via email to