> > Hmm, yes. Wasn't there a giant storm in a teacup on the gcc list a while > > back about whether gcc should optimise on the basis that overflow of > > signed arithmetic is undefined? > > I don't understand why the carry bit is important...
It's because ISO C says that overflow of signed arithmetic produces undefined results, and recent gccs exploit that fact for optimisation purposes. Note that overflow of unsigned arithmetic is still well defined. If this is the problem then presumably another fix is to use unsigned subtraction in fast_cmp. An interesting first experiment would be to build the unmodified sources with and without -fno-strict-overflow and see if that changes the outcome. J ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers