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

--- Comment #7 from Alejandro Colomar <alx at kernel dot org> ---
(In reply to David Malcolm from comment #6)
> -fanalyzer deliberately doesn't warn about memory leaks within "main":
>   https://godbolt.org/z/94ch4T1Ke
> given that once you exit main, leaks don't matter.
> 
> Renaming the function to "not_main" shows it complain correctly about the
> leak:
>   https://godbolt.org/z/d4GM3EdKr

That makes sense.  Thanks!

Reply via email to