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 fortran/54301] Add optional warning if pointer assigning a local variable to a nonlocal pointer


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54301

Mikael Morin <mikael at gcc dot gnu.org> changed:

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

--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> 2012-08-17 16:58:54 UTC ---
As always, that's a nice to have feature, but without a thorough control
flow/value range/whatever analysis, it would either give a warning in trivial
cases only or have many false positives.

A warning for b) makes sense to me; for the others:
 a)     I don't see what prevents a function from returning a short lived
pointer
 c) d)  The pointer is globally accessible, so I'm not so sure how it could be
       nullified or re-associated.


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