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++/86177] Wnull-dereference warning for object file compile missing


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

--- Comment #6 from Jonny Grant <jg at jguk dot org> ---
Jonathan, This is a good point. Where is best to document it?
It's very useful to have these warnings, and I was unaware that -Wall would not
turn on such a necessary feature, or -O2

Could there be overall documentation on some default warning options that give
most useful warnings for safe code development?


BTW, I do feel the function could be warned when compiled as an object.

void f(int *i)
{
    *i = 1;
}


There is an implied requirement that the pointer is never null.

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