summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-23 10:29:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-09-23 10:29:00 (GMT)
commit401ea793a5691a5dc91795371922de138ea7f68c (patch)
tree453ef7765e2aeaef13b888bb260a18e6298fda26 /generic/tcl.h
parentee0b1f4703492cd3d1889551e782882b6b081b46 (diff)
parentcb1f5ad4901220060bc319970cf3434734b3a1aa (diff)
downloadtcl-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.h12
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
/*