parker@epiwrl.EPI.COM (Alan Parker) (04/28/88)
We had a section of code fail on a Sun-4 that was like this: double foo(); if ((int)foo(a)) { stuff } stuff was being executed even when foo returned exactly zero. I changed it to: double foo(); int i; i = foo(a); if (i) { stuff } and the code did what I intended it to do. Should this have worked properly, or am I doing something wrong here? Is this a known Sun-4 problem? We had this problem on a machine as a customer demo site, so I don't have any details about the revisions of the hardware or the Sun software, but I could probably find out.