[Bug middle-end/77433] warn about usage of object that outside of the scope of the object

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 31 19:49:00 GMT 2016


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

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> This needs data flow to see if b usage cross over the clobber or not.

I think the simpler case can be warned in the FE. I cannot imagine a correct
use of assigning a pointer from an inner scope to a variable in the outer
scope. Even if the pointer is never used, there is not reason to do that.


More information about the Gcc-bugs mailing list