------- Comment #9 from thutt at vmware dot com 2008-12-23 15:44 ------- (In reply to comment #1) > The compiler may also choose to make optimizations based on > the knowledge that certain function arguments will not be null. > > Witeness the last sentence.
If this is the case, then might it not be better for the diagnostic to be an error rather than a warning? If it's a warning that is not even printed at the standard level of warnings, then it could be easily argued that the compiler is generating bad code. In other words, if a parameter does not meet a required precondition, then the compiler should issue an error always. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30043