http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49820

--- Comment #14 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-27 
11:23:25 UTC ---
> My example does indeed give a warning when compiled with -Wstrict-overflow=2.
> Unfortunately, -Wall implies only -Wstrict-overflow=1 so I got no warning in
> the first place. I think the warning levels need to be adjusted so that we get
> the warning with -Wall because the consequences are no less serious than
> ignoring an overflow check with if(a+const<a), which gives a warning with
> -Wstrict-overflow=1

If you are doing clever things, adjust the warning level you're using.  They
have been chosen after considering several trade-offs, so changing them would
entail redoing the full analysis.  Patches welcome.

Reply via email to