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/64463] Add warning: returns_nonnull attribute on a function compared against NULL


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> Incorrectly putting the attribute on the function is likely to be much rarer
> than unnecessarily checking the result.

And PR 84202 would address the problem of incorrectly placing the attribute,
and would be based on the definition, not how the callers use it.

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