delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/04/05:36:58

Date: Sun, 4 Oct 1998 12:35:40 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jan Theodore Galkowski <jtgalkowski AT alum DOT mit DOT edu>
cc: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>, djgpp AT delorie DOT com
Subject: Re: Recently installed version of DJGPP's gcc hangs
In-Reply-To: <6unii2$l29$1@antares.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.981004123438.1863K-100000@is>
MIME-Version: 1.0

On 28 Sep 1998, Martin Stromberg wrote:

> jtgalkowski AT alum DOT mit DOT edu wrote:
> : The file has been diagnosed by Mr Eli Zaretskii as "a huge
> : 'switch' statement with a lot of cases."  Moreover, he
> : goes on to say "Such sources are known to require
> : preposterous amounts of memory while GCC compiles them,
> : and also a lot of stack space."
> 
> Two suggestions: turn down optimisation level or change the code to two
> or more switch statements ("if(i<100) { switch(i) ... } else { switch(i) 
> ... }").

I don't see any problems with this program.  I have succeeded to
compile it on my machine, and the only thing I needed was to have
cc1.exe stubedited to 1024K stack.  512K (or less) would indeed crash
the compiler and CWSDPMI.  But given the stack that is large enough,
even 7MB of free RAM and 25MB of swap space were enough to compile
the program, although GCC did page while compiling.

Are you sure you stubedited the compiler correctly?  Here's how to do
that:

	stubedit cc1.exe minstack=1024k

(this should be run from the same directory where cc1.exe is kept).

What version of GCC are you using (I used 2.7.2.1)?  Also, what
command line did you use to compile it (I used "gcc -c -O2")?

- Raw text -


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