DragonFly kernel List (threaded) for 2007-11
DragonFly BSD
DragonFly kernel List (threaded) for 2007-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: GCC-4 compiler bug


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Thu, 29 Nov 2007 00:20:06 +0100

Matthew Dillon wrote:
    I was rather surprised that the compiler barfed on that code.  That code
    was, in fact, explicitly testing for an overflow.  Regardless of what
    C99 says, it would be ultra stupid for any compiler to stray outside of
    the type's width.

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   / \



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]