diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-23 10:29:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-23 10:29:00 (GMT) |
commit | 401ea793a5691a5dc91795371922de138ea7f68c (patch) | |
tree | 453ef7765e2aeaef13b888bb260a18e6298fda26 /generic/tcl.h | |
parent | ee0b1f4703492cd3d1889551e782882b6b081b46 (diff) | |
parent | cb1f5ad4901220060bc319970cf3434734b3a1aa (diff) | |
download | tcl-401ea793a5691a5dc91795371922de138ea7f68c.zip tcl-401ea793a5691a5dc91795371922de138ea7f68c.tar.gz tcl-401ea793a5691a5dc91795371922de138ea7f68c.tar.bz2 |
Micro-optimization handling Tcl_Panic(), suggested by D. Richard Hipp.
As a side-effect, this is as well a fix for [1446864]: segfaults if Tcl_Panic() returns.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 1f7b5cb..a08edde 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -143,8 +143,20 @@ extern "C" { #endif #if defined(__GNUC__) && (__GNUC__ > 2) # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b))) +# define TCL_NORETURN __attribute__ ((noreturn)) +# if defined(BUILD_tcl) || defined(BUILD_tk) +# define TCL_NORETURN1 __attribute__ ((noreturn)) +# else +# define TCL_NORETURN1 /* nothing */ +# endif #else # define TCL_FORMAT_PRINTF(a,b) +# if defined(_MSC_VER) && (_MSC_VER >= 1310) +# define TCL_NORETURN _declspec(noreturn) +# else +# define TCL_NORETURN /* nothing */ +# endif +# define TCL_NORETURN1 /* nothing */ #endif /* |