[Bug tree-optimization/78902] Add malloc(0) into -Walloc-zero warning

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 26 14:33:00 GMT 2018


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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-07-26
           Assignee|marxin at gcc dot gnu.org          |msebor at gcc dot gnu.org
            Summary|Missed malloc               |Add malloc(0) into
                   |optimizations: malloc w/o   |-Walloc-zero warning
                   |LHS and zero argument       |
     Ever confirmed|0                           |1

--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm renaming that and re-assigning that to Martin Sebor. Note that malloc w/o
is optimized out, so only missing possibility was malloc (0), but it's
problematic as some targets may return an uniq pointer.


More information about the Gcc-bugs mailing list