delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/23/13:30:56

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Exceptions work with -fsjlj-exceptions flag. Why?
Date: Mon, 23 Mar 1998 09:54:41 -0800
Organization: Hewlett Packard
Lines: 24
Message-ID: <6f67l4$i5p$1@rosenews.rose.hp.com>
References: <351671d4 DOT 2800186 AT 192 DOT 168 DOT 1 DOT 250>
NNTP-Posting-Host: ros51675cra.rose.hp.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

David Vrabel wrote in message <351671d4 DOT 2800186 AT 192 DOT 168 DOT 1 DOT 250>...
>To get exception handling to work in GCC 2.8.0 you have to set the
>flag:  -fsjlj-exceptions
Correct.  Robert will probably be releasing a patch to the startup code that
will allow
-fexceptions to work also.  I am probably going to give up on collect2.

>Which I presume uses a different method of exception handling.

Correct also.  Instead of exception tables, where the code goes through a
list of addresses, it uses
setjump/longjump.  SJLJ is more flexible, but it is very slow (it has a big
run time overhead).  Exception
tables has data bloat, but no overhead unless an exception actually occurs.

>What does the flag do and why does it work when the other method of
>exception handling doesn't?
Regular exception handling is expecting the startup code (or Collect2), to
initialize the exception table
before code begins executing.  Currently, thats not happening.

Andy

- Raw text -


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