www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/09:13:42

Date: Wed, 1 Apr 1998 17:12:49 +0300 (IDT)
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: Federico Spinazzi <federico AT SysPr03 DOT disat DOT unimi DOT it>
cc: Nate Eldredge <eldredge AT ap DOT net>, Nicolas Blais <eletech AT netrover DOT com>,
djgpp AT delorie DOT com
Subject: Re: Why won't this work?
In-Reply-To: <Pine.LNX.3.93.980401143359.15078A-100000@SysPr03.disat.unimi.it>
Message-ID: <Pine.SUN.3.91.980401171115.7170F-100000@is>
MIME-Version: 1.0

On Wed, 1 Apr 1998, Federico Spinazzi wrote:

> > >> You can declare an array for com:
> > >> char com[22222222222222];
> > >           ^^^^^^^^^^^^^^
> > >This is *way* too much.  If you compile such a program it will bomb, 
> > >since automatic arrays cannot be larger than 256KB without changing the 
> > >default stack size.  See section 15.9 of the DJGPP FAQ list, for more 
> > >about this.
> 	for(hmis=HOW_MUCH_I_M_STUPID; hmis; hmis--) {
> 		fprintf(stdout, "Hey, do you know how much I'm stupid
> ?\n");
> 		fflush(stdout);

The last snippet is entirely different from the first.  The problem is 
not with the number, but with the declaration of an automatic array 
having that large dimension.  A program like that will compile, but will 
bomb at run time.

- Raw text -


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