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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
-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

Reply via email to