Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!apollo!rehrauer From: rehrauer@apollo.HP.COM (Steve Rehrauer) Newsgroups: comp.sys.apollo Subject: Re: Possible bug in SR10.3 C compiler Message-ID: <50dff2e9.20b6d@apollo.HP.COM> Date: 9 Apr 91 19:06 GMT References: <1991Apr5.155432.2831@oakhill.sps.mot.com> Sender: root@apollo.HP.COM Reply-To: rehrauer@apollo.HP.COM (Steve Rehrauer) Distribution: na Organization: Hewlett-Packard Apollo Division - Chelmsford, MA Lines: 36 In article <1991Apr5.155432.2831@oakhill.sps.mot.com> tomc@oakhill.sps.mot.com (Tom Cunningham) writes: >Script started on Fri Apr 5 09:34:26 1991 >node_1271f!//node_1271f/usr2/tomc/tmp [1] cat test.c >main () >{ > double d; > > d = (unsigned long)0xFFFFFFFF; > printf ("%f\n", d); >} >node_1271f!//node_1271f/usr2/tomc/tmp [2] cc -o test test.c >node_1271f!//node_1271f/usr2/tomc/tmp [3] ./test >-1.000000 You didn't say what version of C you're using, but I'll assume 6.7. (We decoupled the OS and compilers not too long ago, so I'm not always sure what people are using when they say "sr10.x compilers.") In that case, it looks like this has been fixed by the so-called "CR1.0" compilers (version 6.8 of C). bugs> /latest/compilers/1989.1/cc.m/cc.m68k bug No errors, no warnings, 2 info msgs, C compiler 68K Rev 6.7(316) bugs> bug.bin bugs> /latest/compilers/cr1.0/cc.m/cc.m68k bug No errors, no warnings, 2 info msgs, C compiler 68K Rev 6.8(168) bugs> bug.bin 4294967295.000000 Disclaimer: I'm just an engineer, I don't speak for HP/Apollo and sometimes not even for me. The preceding was just FYI, not implied intent to fix or not fix it in 6.7 C. Talk to your friendly customer service people. -- "The goons are riding motorcycles, but WE'VE | (Steve) rehrauer@apollo.hp.com got a whole big metal car! This will be like | Hewlett-Packard stepping on ants..." -- Freelance Police | Massachusetts Languages Lab