Mail Archives: djgpp/1994/10/27/21:48:06
GCC 260 Maths Bug
I have just installed GCC 260 on my 486DX266 PC under DOS6.2. This is my
first encounter with this package and I have found a bug immediately. The
code below hangs at the double to int conversion in line 7; it should
generate an overflow error ( or return 0x80000000). Would someone with
more experience of GCC like to comment.
TIA
Shaw
#include <stdio.h>
int main()
{
int i;
double a;
a=2.5e10;
i=(int)a;
printf("%d\n",i);
return 0;
}
- Raw text -