Yes, I think it is stupid. But I don't think that any newer GCC version fixes this. We'll probably have to change GCC not to include this optimization. Mind you that this happens only for signed overflows. Unsigned overflow should still work as we expect.
cheers
simon
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \