Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Conversion of unsigned long to double Message-ID: <17056@mimsy.UUCP> Date: 22 Apr 89 14:43:33 GMT References: <515@bsiao.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 12 In article <515@bsiao.UUCP> tvdl@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@mimsy.umd.edu Path: uunet!mimsy!chris