C Compiler bug

Gregory Smith greg at utcsri.UUCP
Sat Jul 26 02:12:49 AEST 1986


>> Please try this code on your flavor of C compiler...
>(followed by code demonstrating essentially
>>    i = i/2.5;
>vs.
>>    i /= 2.5;
>
>The answer is absolutely unequivocal on this point.  A compiler
>that does not treat i=i/float and i/=float identically is broken,
>although many compilers are so broken.  This question was
>discussed to death on the net a year or so ago...

Well, I am definitely adding "(int) op= (float) and related things
to my list of Things Not To Do If I Want To Make Life Easier.
This can be considered "defensive programming".

-- 
"You'll need more than a Tylenol if you don't tell me where my father is!"
						- The Ice Pirates
----------------------------------------------------------------------
Greg Smith     University of Toronto      UUCP: ..utzoo!utcsri!greg



More information about the Comp.lang.c mailing list