Is this a bug in Turbo C 2.0?

Charles Hannum CMH117 at psuvm.psu.edu
Fri Mar 9 19:29:59 AEST 1990


In article <1180 at sdrc.UUCP>, scjones at sdrc.UUCP (Larry Jones) says:
>
>In article <3210 at pur-phy>, murphy at pur-phy (William J. Murphy) writes:
>> [ should long = short + short; be done with short or long
>> arithmetic? ]
>
>Either is acceptable.  ANSI C requires the arithmetic to be done
>in short -- if the result overflows, the results are undefined,
>thus getting the right answer (by actually doing long arithmetic)
>is acceptable.

But relying on the result to be correct in *unacceptable*.


Virtually,
- Charles Martin Hannum II       "Klein bottle for sale ... inquire within."
    (That's Charles to you!)     "To life immortal!"
  cmh117 at psuvm.{bitnet,psu.edu}  "No noozzzz izzz netzzzsnoozzzzz..."
  c9h at psuecl.{bitnet,psu.edu}    "Mem'ry, all alone in the moonlight ..."



More information about the Comp.lang.c mailing list