[Bug c/88737] RFE: Track ownership moves

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 7 11:03:00 GMT 2019


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |msebor at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
           Severity|enhancement                 |normal

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Practically the implementation could mark a end-of-life like the following:

  free (a);
  a = {CLOBBER};
  printf("%d\n", *a);

and you'd get a uninitialized use warning on the *a dereference.

This is something gimplification could emit after free() calls without
any extension(?)


More information about the Gcc-bugs mailing list