On Tue, 13 Nov 2007, Nicholas Clark via RT wrote: > On Mon, Nov 12, 2007 at 12:33:41PM -0800, Andy Dougherty wrote: > > > It may well be there's an issue with gcc's optimizer, since the problem > > goes away without optimization, but I think it's also fair to say that > > the definition of FLOAT_IS_ZERO in include/parrot/misc.h is > > perhaps not optimal here. I'd prefer the simpler definition: > > > > #define FLOAT_IS_ZER0(f) ((f) == 0.0) > > > > but I didn't get anywhere last time I proposed that. I don't know > > what else to do. > > I suggested > > f >= 0.0 && f <= 0.0 > > which I believe is identical, even in the face of NaNs, but should also shut > up the whining, er, warning, about comparison.
You're probably right. However, given that gcc currently throws over a thousand warnings it's hard to get worried about about another one or two. > Because I would be so bold as to say that the constant zero would be > exempted from any useful warning about floating point equality check. Yes, it's amazing how gcc seems to have hundreds of flags that are almost, but not quite, entirely unlike the ones you actually want. -- Andy Dougherty [EMAIL PROTECTED]