[Bug c++/86177] Wnull-dereference warning for object file compile missing
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Sun Jun 17 08:37:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list