diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-22 15:24:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-22 15:24:11 (GMT) |
commit | cb1f5ad4901220060bc319970cf3434734b3a1aa (patch) | |
tree | f3f50ec898e4a58a8832047e598219068a9b304f /generic/tcl.h | |
parent | bd3fec22b475c3e3e0420a4db76adc41b1cdd8bf (diff) | |
download | tcl-cb1f5ad4901220060bc319970cf3434734b3a1aa.zip tcl-cb1f5ad4901220060bc319970cf3434734b3a1aa.tar.gz tcl-cb1f5ad4901220060bc319970cf3434734b3a1aa.tar.bz2 |
Decorate Tcl_Panic and Tcl_PanicVA with the noreturn option, alowing further optimizations by the C-compiler.panic_noreturn
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 1f7b5cb..13e2303 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -143,8 +143,16 @@ extern "C" { #endif #if defined(__GNUC__) && (__GNUC__ > 2) # define TCL_FORMAT_PRINTF(a,b) __attribute__ ((__format__ (__printf__, a, b))) +# define TCL_NORETURN __attribute__ ((noreturn)) +# define TCL_NORETURN1 __attribute__ ((noreturn)) #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 /* |