386/ix bug on doubles inside if-statement ?
vrs
vrs at littlei.UUCP
Wed Apr 27 23:49:50 AEST 1988
Yes, I have seen this problem. The compiler cannot cope with two functions
returning float/double in the relational expression. It seems to handle other
kinds of floating point operands better, so when I need a work-around I rewrite
if (f(x) < g(y)) ...
as
{ double t = f(x);
if (t < g(y)) ... }
Being sure, of course, to make the result more readble than this. There's a
belief locally that this is fixed in V.3.1 (and later?) cc for the 386.
Vince
More information about the Comp.bugs.sys5
mailing list