Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: -fstrict-overflow and -Wstrict-overflow
On Sat, Oct 13, 2012 at 04:56:17AM +0000, David Holland wrote:
> > >One of (serious) problem that we can't use -Wstrict-overflow by default
> > >is that gcc sometimes misundestand it :-<
> > >
> > >How should we use it?
> >
> > Do you have an example where gcc does the wrong thing with
> > -Wstrict-overflow? (The example in your message, which I am not
> > quoting here, showed gcc doing the right thing: that is, drawing
> > attention to a case where the program invoked undefined behaviour.)
>
> fairly simple one: games/backgammon/backgammon/move.c, at line 164.
I fixed that by reorganizing the backgammon code and then inserting a
strategic assertion.
However, I draw everyone's attention to the remaining failure in
games/gomoku, on line 682 of pickmove.c:
681: verts = checkframes(cbp, ocbp, osp, s, vertices);
682: if (verts < 0)
where checkframes() is a nontrivial 130-line function.
I don't think this one is going to get "fixed" anytime soon.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index