------- Comment #2 from madcoder at debian dot org 2006-12-01 22:45 ------- Please, I'm not telling the behaviour is crazy, it's indeed correct.
I'm just asking for a smallish warning that I may be shooting myself in the foot when I do sth like my 'foo' function from the bug report. When you do : size_t i; // ... if (i >= 0) { ... if (i < 0) { ... gcc issues a warning to tell me that I'm doing a test that will always be true (or always be false). I'd just like to have the same when I've specified that a parameter is nonnull and that I nontheless tries to see if it's NULL or not. You're not answering to what I ask, I've read the documentation, and I've already acknowledged that gcc optimizations in presence of the nonnull attribute are legitimate. -- madcoder at debian dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30043