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 c++/77298] -Wnonnull-compare only emitted for code which is invoked


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The warning for proper behavior needs the function being gimplified and in SSA
form, unless the FE start doing that themselves, otherwise it can't generally
determine if an argument is known to be non-NULL or has been reassigned
afterwards and no guarantees are known about it.
Of course, this is quite a special case, because this isn't a parameter one can
change in the function in any way, so theoretically we could warn for this in
the FE.

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