Date: Sun, 4 Oct 1998 12:35:40 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Jan Theodore Galkowski cc: Martin Stromberg , 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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")?