diff options
author | obrien <obrien@FreeBSD.org> | 2001-03-24 01:58:31 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-03-24 01:58:31 +0000 |
commit | 83655f473eb53a186bdcf7f5f8f2927225bb39d0 (patch) | |
tree | 4e15b74819832174dd1510759ff5bf2e2cb921a9 /contrib/gcc/expr.h | |
parent | b2d278bd47d90165e571cf2b9529c2ef154c5c4a (diff) | |
download | FreeBSD-src-83655f473eb53a186bdcf7f5f8f2927225bb39d0.zip FreeBSD-src-83655f473eb53a186bdcf7f5f8f2927225bb39d0.tar.gz |
Import the setjump/longjump exception handling fixes from GCC 2.95.3.test3
that were removed from GCC 2.95.3.test4 and the subsequent release due
to problems on HP-UX. However, they work just fine on all the BSD's.
W/o these patches the following program segmentation faults if compiled
with -O2 (but not -Os or -O or -O0):
#include <stdio.h>
class A {
public:
A() { printf("c'tor A\n"); }
~A(){ printf("d'tor A\n"); }
};
class foo : public A {
public:
foo() { printf("C'tor foo\n"); throw 8; }
~foo() { printf("D'tor foo\n"); }
};
int main(){
try { foo fii; }
catch (int){ printf("catch ...\n"); }
return 0;
}
Diffstat (limited to 'contrib/gcc/expr.h')
-rw-r--r-- | contrib/gcc/expr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/gcc/expr.h b/contrib/gcc/expr.h index 55e82e6..c279774 100644 --- a/contrib/gcc/expr.h +++ b/contrib/gcc/expr.h @@ -831,7 +831,8 @@ extern rtx store_expr PROTO((tree, rtx, int)); Useful after calling expand_expr with 1 as sum_ok. */ extern rtx force_operand PROTO((rtx, rtx)); -extern rtx expand_builtin_setjmp PROTO((rtx, rtx, rtx, rtx)); +extern void expand_builtin_setjmp_setup PARAMS ((rtx, rtx)); +extern void expand_builtin_setjmp_receiver PARAMS ((rtx)); #ifdef TREE_CODE /* Generate code for computing expression EXP. |