Conversion of unsigned long to double

Chris Torek chris at mimsy.UUCP
Sun Apr 23 00:43:33 AEST 1989


In article <515 at bsiao.UUCP> tvdl at bsiao.UUCP (Timo van der Laan) writes:
>The C-compiler for IX370 (running on a 9370 machine) treats an
>unsigned long as a signed long if that unsigned long is assigned to
>a double. (See the program below).

>Is this behavior permitted in ANSI?

No; but this mistake is easy to make when building a compiler.  4.2BSD
had the same bug.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list