| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 29 Jun 1998 10:07:59 +0200 (WET) |
| From: | Andris Pavenis <pavenis AT lanet DOT lv> |
| To: | Gerhard Gruber <sparhawk AT eunet DOT at> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: Bug in DJGPP with exceptions? |
| In-Reply-To: | <35962535.6464680@news.Austria.EU.net> |
| Message-ID: | <Pine.A32.3.91.980629100428.32588A-100000@ieva05.lanet.lv> |
| MIME-Version: | 1.0 |
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.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |