------- Comment #3 from pinskia at gcc dot gnu dot org 2006-12-01 22:49 -------
(In reply to comment #2)
> 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) { ...
And this optimization happens way after we are done parsing so ...
I don't think a warning is the right thing in this case because the developer
should have read the documention and it is harder to give a warning in this
case really as this optimization is done currently only in the VRP so we don't
know if it is from
*a = 1;
if (!a)
...
of just
from nonnull.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30043