delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/05/03:47:50

Date: Tue, 4 Oct 1994 13:23:20 +0500
From: "Don L." <lopez AT vsl DOT ist DOT ucf DOT edu>
To: Brian Acton <brian_acton AT powertalk DOT apple DOT com>
Cc: "djgpp AT sun DOT soe DOT clarkson DOT edu" <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: djgpp and the 386SX

On 28 Sep 1994, Brian Acton wrote:

> Hello All,
> 
> I'm compiling with the flags "-mno-486"
> 
> 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++;
> }
> 
> Any help would be greatly appreciated
> 
> Brian Acton
> 


Off hand I don't know what the "-mno-486" flag does but by ANSI C 
definitions, an signed integer as you have declared "i" to be; has the 
maximum and minimum values of -32,767 to 32,767. You want to declare "i" 
as a unsigned int ( now i can be from 0 to 65000 ) or a unsinged long or 
long int which gives you 4 million for the unsigned long or +/- 2million 
for the signed long int. 

Hope this helps,
Don ;)


/////////////////////////////////////////////////////
	Don L.
	Institute for Simulation and Training
	lopez AT vsl DOT ist DOT ucf DOT edu
	http://www.vsl.ist.ucf.edu/~lopez

	Nothing is real......
	Reality is like a broken glass....
	The harder you try and put it together....
	The worse it looks....
/////////////////////////////////////////////////////



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019