diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-21 01:28:58 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-21 01:28:58 +0000 |
commit | 41cac6ed1994712d596d157b0ee8f0f2440834c6 (patch) | |
tree | bb20d5cb850a6fdcac2b45205946cebd71cf72e6 /gcc/objc | |
parent | 652292641283a02203e3fa9c88baa57324eb6773 (diff) | |
download | gcc-41cac6ed1994712d596d157b0ee8f0f2440834c6.tar.gz |
Index: objc/ChangeLog
2005-10-20 Geoffrey Keating <geoffk@apple.com>
* objc-act.c (synth_module_prologue): Clear TREE_NOTHROW
on objc_msgSend and like builtin functions.
Index: testsuite/ChangeLog
2005-10-20 Geoffrey Keating <geoffk@apple.com>
* obj-c++.dg/except-1.mm: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 29b1d4218f0..7418b0bc69d 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2005-10-20 Geoffrey Keating <geoffk@apple.com> + + * objc-act.c (synth_module_prologue): Clear TREE_NOTHROW + on objc_msgSend and like builtin functions. + 2005-10-17 Andreas Krebbel <krebbel1@de.ibm.com> * objc-act.c (objc_build_component_ref): Adjust call to diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 25bc6b13a51..f889c22e767 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1597,6 +1597,10 @@ synth_module_prologue (void) (xref_tag (RECORD_TYPE, get_identifier (UTAG_IVAR_LIST))); + /* TREE_NOTHROW is cleared for the message-sending functions, + because the function that gets called can throw in Obj-C++, or + could itself call something that can throw even in Obj-C. */ + if (flag_next_runtime) { /* NB: In order to call one of the ..._stret (struct-returning) @@ -1626,12 +1630,21 @@ synth_module_prologue (void) type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + /* These can throw, because the function that gets called can throw + in Obj-C++, or could itself call something that can throw even + in Obj-C. */ + TREE_NOTHROW (umsg_decl) = 0; + TREE_NOTHROW (umsg_nonnil_decl) = 0; + TREE_NOTHROW (umsg_stret_decl) = 0; + TREE_NOTHROW (umsg_nonnil_stret_decl) = 0; + /* id objc_msgSend_Fast (id, SEL, ...) __attribute__ ((hard_coded_address (OFFS_MSGSEND_FAST))); */ #ifdef OFFS_MSGSEND_FAST umsg_fast_decl = builtin_function (TAG_MSGSEND_FAST, type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + TREE_NOTHROW (umsg_fast_decl) = 0; DECL_ATTRIBUTES (umsg_fast_decl) = tree_cons (get_identifier ("hard_coded_address"), build_int_cst (NULL_TREE, OFFS_MSGSEND_FAST), @@ -1654,6 +1667,8 @@ synth_module_prologue (void) umsg_super_stret_decl = builtin_function (TAG_MSGSENDSUPER_STRET, type, 0, NOT_BUILT_IN, 0, NULL_TREE); + TREE_NOTHROW (umsg_super_decl) = 0; + TREE_NOTHROW (umsg_super_stret_decl) = 0; } else { @@ -1676,6 +1691,7 @@ synth_module_prologue (void) umsg_decl = builtin_function (TAG_MSGSEND, type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + TREE_NOTHROW (umsg_decl) = 0; /* IMP objc_msg_lookup_super (struct objc_super *, SEL); */ type @@ -1686,6 +1702,7 @@ synth_module_prologue (void) umsg_super_decl = builtin_function (TAG_MSGSENDSUPER, type, 0, NOT_BUILT_IN, NULL, NULL_TREE); + TREE_NOTHROW (umsg_super_decl) = 0; /* The following GNU runtime entry point is called to initialize each module: |