tomc@oakhill.sps.mot.com (Tom Cunningham) (04/05/91)
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
node_1271f!//node_1271f/usr2/tomc/tmp [4] ^D
script done on Fri Apr 5 09:35:36 1991
--
Tom Cunningham Motorola Inc. Austin TX
tomc@bouwsma.sps.mot.com
cs.utexas.edu!oakhill!bouwsma!tomc
rbirch@pase60.Convergent.Com (Robert Birch) (04/09/91)
>main () >{ > double d; ^^^^^^ > > d = (unsigned long)0xFFFFFFFF; > printf ("%f\n", d); ^^ What is this SUPPOSED to do? >} >node_1271f!//node_1271f/usr2/tomc/tmp [2] cc -o test test.c >node_1271f!//node_1271f/usr2/tomc/tmp [3] ./test >-1.000000 -rdb (a hardware guy...)
rehrauer@apollo.HP.COM (Steve Rehrauer) (04/10/91)
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