This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #6 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #5)
> (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.

Actually, forget that. It is obvious this can happen indeed in correct code.
Not sure what I was thinking.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]