summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2009-08-24 03:18:23 (GMT)
committerdas <das>2009-08-24 03:18:23 (GMT)
commitfd792e63142bfc709a0136d403c98daf781ebe48 (patch)
tree40e1df79e15764b61da4c0b31f9d4c32a22d4ecd
parent2e2467e1e0a386b1bd53818a449cccc41f27dc87 (diff)
downloadtcl-fd792e63142bfc709a0136d403c98daf781ebe48.zip
tcl-fd792e63142bfc709a0136d403c98daf781ebe48.tar.gz
tcl-fd792e63142bfc709a0136d403c98daf781ebe48.tar.bz2
* generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static
analyzer in PURIFY builds, replacing preprocessor/assert technique.
-rw-r--r--ChangeLog3
-rw-r--r--generic/tclInt.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index efa8543..f38f2a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-08-24 Daniel Steffen <das@users.sourceforge.net>
+ * generic/tclInt.h: Annotate Tcl_Panic as noreturn for clang static
+ analyzer in PURIFY builds, replacing preprocessor/assert technique.
+
* macosx/tclMacOSXNotify.c: fix multiple issues with nested event loops
when CoreFoundation notifier is running in embedded mode. (fixes
problems in TkAqua Cocoa reported by Youness Alaoui on tcl-mac)
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 93dbf01..3501083 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.435 2009/08/19 14:26:18 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.436 2009/08/24 03:18:23 das Exp $
*/
#ifndef _TCLINT
@@ -4249,9 +4249,7 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum,
#if defined(PURIFY) && defined(__clang__) && !defined(CLANG_ASSERT)
#include <assert.h>
#define CLANG_ASSERT(x) assert(x)
-#define TclPanic Tcl_Panic
-#undef Tcl_Panic
-#define Tcl_Panic(f, ...) do { TclPanic(f,##__VA_ARGS__); CLANG_ASSERT(0); } while(0)
+EXTERN void Tcl_Panic(const char * format, ...) __attribute__((analyzer_noreturn));
#elif !defined(CLANG_ASSERT)
#define CLANG_ASSERT(x)
#endif