[10092] in Athena Bugs
decmips 7.4G: cc
daemon@ATHENA.MIT.EDU (sethf@Athena.MIT.EDU)
Mon Nov 23 13:18:32 1992
From: sethf@Athena.MIT.EDU
To: bugs@Athena.MIT.EDU
Date: Mon, 23 Nov 92 13:18:22 EST
System name: vandiver
Type and version: KN02ca 7.4G
Display type: PMAG-DV
What were you trying to do?
compile
What's wrong:
#include <stdio.h>
main() {
int n = 10;
n = n + ((int) (-0.99));
printf("%d\n",n);
n = 10;
n += ((int) (-0.99));
printf("%d\n",n);
}
gives as output
10
9
What should have happened:
The output should be
10
10
It works with gcc.
Please describe any relevant documentation references:
cc(1), gcc(1)