summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/unwind/unwind.c
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2012-04-14 20:29:22 -0400
committerRichard Lowe <richlowe@richlowe.net>2012-06-14 15:56:15 -0400
commit6a3e8e8695d5c7d1d18c6800d676990d7f61a2a4 (patch)
tree0779c36aa010ab283c6d8df98bdb87909bf11d3a /usr/src/lib/libc/port/unwind/unwind.c
parenta3477ee4728af4a4c3c6869e248aa735d52cbefb (diff)
downloadillumos-gate-6a3e8e8695d5c7d1d18c6800d676990d7f61a2a4.tar.gz
1450 Illumos should be buildable with GCC4
Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com> Reviewed by: Gordon Ross <gwr@nexenta.com> Reviewed by: Albert Lee <trisk@nexenta.com> Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/lib/libc/port/unwind/unwind.c')
-rw-r--r--usr/src/lib/libc/port/unwind/unwind.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/lib/libc/port/unwind/unwind.c b/usr/src/lib/libc/port/unwind/unwind.c
index 2a7f0ccc0f..e457f8df5c 100644
--- a/usr/src/lib/libc/port/unwind/unwind.c
+++ b/usr/src/lib/libc/port/unwind/unwind.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "lint.h"
#include "thr_uberdata.h"
#include <dlfcn.h>
@@ -40,9 +38,13 @@
* _ex_unwind() is provided by libC, but if libC is not loaded we
* need to call a local version of _ex_unwind() which does exactly
* the same thing except for calling C++ destructors.
+ *
+ * Note that neither of these literally "returns twice" as, for eg, setjmp
+ * does, but they induce unusual control flow which the compiler should treat
+ * in the same manner (make all registers dead, etc.).
*/
-extern void _ex_clnup_handler(void *, void (*)(void *));
-extern void _ex_unwind_local(void);
+extern void _ex_clnup_handler(void *, void (*)(void *)) __RETURNS_TWICE;
+extern void _ex_unwind_local(void) __RETURNS_TWICE;
#pragma unknown_control_flow(_ex_clnup_handler)
#pragma unknown_control_flow(_ex_unwind_local)