Date: Mon, 29 Jun 1998 10:07:59 +0200 (WET) From: Andris Pavenis To: Gerhard Gruber cc: djgpp AT delorie DOT com Subject: Re: Bug in DJGPP with exceptions? In-Reply-To: <35962535.6464680@news.Austria.EU.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 28 Jun 1998, Gerhard Gruber wrote: > I wrote a program that throws an exception when you read beyond EOF on a file. > > > f(int i) > { > if(i > Filelen) > { > errno = EDOM; > throw(errno); > } > } > > > a() > { > try > { > f(x); > } > catch(int error) > { > break; > } > } > > The exception doesn't get caught and I alwasy get "Abort!" though I didn't > change anything in the source and it worked with gcc 2.7. I also tried > -fexceptions but there is no difference. Any suggestions? I'm afraid You're using gcc-2.8.0. With 2.8.0 You should use -fsljl-exceptions (if I remember correctly) or (that is much better) upgrade to gcc-2.8.1 that has exceptions support fixed. But READ CAREFULLY files in gnu/gcc-2.8.1 after unpacking gcc281b.zip.