Mail Archives: djgpp/1994/09/29/08:32:16
On 28 Sep 1994, Brian Acton wrote:
> Hello All,
>
> I have two computers: a 386SX/16 and a 486/25, and I seem to have problems
> getting programs to run with the 386SX. On my 486, the program runs perfectly
> and I don't have any apparent problems. However, when I try to run the same
> program with a 386SX, the program locks up (ctrl-c fails).
>
> I still get the floating point exception in gdb, and the program still hangs
> outside of gdb.
>
> The lines of code that appear to generate the floating point exception are:
>
> int i;
> int j;
>
> for (i=0; i < 40000; i++) {
> if (i < j ) j++;
> }
Brian,
Did you initialize j? If not initialized, j can adopt the weirdest numeric
values to such an extent that they may even be interpreted as floating-point
numbers.
Regards, Ron.
********************************************************************
| Author.............. Ron Grunwald |
| Internet............ rgrunwal AT bluering DOT cowan DOT edu DOT au |
| Phone............... (09)273 8027 or (09)273 8468 |
|------------------------------------------------------------------|
| Department.......... Information Technology |
| Division/Faculty.... Operations and Systems Management |
| Institute........... Edith Cowan University, Churchlands |
| Location............ Perth, Western Australia |
********************************************************************
"I don't have any solution but I certainly admire the problem!"
- Raw text -