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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
A use of the pointer value (not dereferencing it) after releasing the storage
it points to is perfectly valid, so I don't see how that could be considered an
error.  Esp. for equality compares which can compare pointers to distinct
objects.  Esp. also because 'q' may be equal to 'r', so

 void *r = __builtin_realloc (q, 7);
 if (r == q)
   {
...
   }

would also be diagnosed?  IMHO -Wuse-after-free needs to be fixed here.

Reply via email to