This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/77433] warn about usage of object that outside of the scope of the object
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 31 Aug 2016 19:48:56 +0000
- Subject: [Bug middle-end/77433] warn about usage of object that outside of the scope of the object
- Auto-submitted: auto-generated
- References: <bug-77433-4@http.gcc.gnu.org/bugzilla/>
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.