summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.h4
-rw-r--r--generic/tclPanic.c26
-rw-r--r--win/tclWinPanic.c16
3 files changed, 16 insertions, 30 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 90bc0c1..52288ab 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -597,7 +597,7 @@ typedef void (Tcl_FreeProc) (char *blockPtr);
#endif
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
-typedef TCL_NORETURN1 void (Tcl_PanicProc) (const char *format, ...);
+typedef void (Tcl_PanicProc) (const char *format, ...);
typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
char *address, int port);
typedef void (Tcl_TimerProc) (void *clientData);
@@ -2312,7 +2312,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
const char * TclInitStubTable(const char *version);
void * TclStubCall(void *arg);
#if defined(_WIN32)
- TCL_NORETURN1 void Tcl_ConsolePanic(const char *format, ...);
+ void Tcl_ConsolePanic(const char *format, ...);
#else
# define Tcl_ConsolePanic NULL
#endif
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 2dd33d2..dcceb25 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -71,7 +71,7 @@ Tcl_SetPanicProc(
*/
/* coverity[+kill] */
-void
+TCL_NORETURN void
Tcl_Panic(
const char *format,
...)
@@ -104,21 +104,21 @@ Tcl_Panic(
fprintf(stderr, "\n");
fflush(stderr);
#endif
-# if defined(__GNUC__)
- __builtin_trap();
-# elif defined(_WIN64)
- __debugbreak();
-# elif defined(_MSC_VER) && defined (_M_IX86)
- _asm {int 3}
-# elif defined(_WIN32)
- DebugBreak();
-# endif
+ }
+#if defined(__GNUC__)
+ __builtin_trap();
+#elif defined(_WIN64)
+ __debugbreak();
+#elif defined(_MSC_VER) && defined (_M_IX86)
+ _asm {int 3}
+#elif defined(_WIN32)
+ DebugBreak();
+#endif
#if defined(_WIN32)
- ExitProcess(1);
+ ExitProcess(1);
#else
- abort();
+ abort();
#endif
- }
}
/*
diff --git a/win/tclWinPanic.c b/win/tclWinPanic.c
index 7928dcd..02bd767 100644
--- a/win/tclWinPanic.c
+++ b/win/tclWinPanic.c
@@ -28,7 +28,7 @@
*----------------------------------------------------------------------
*/
-TCL_NORETURN1 void
+void
Tcl_ConsolePanic(
const char *format, ...)
{
@@ -63,20 +63,6 @@ Tcl_ConsolePanic(
WriteFile(handle, "\n", 1, &dummy, 0);
FlushFileBuffers(handle);
}
-# if defined(__GNUC__)
- __builtin_trap();
-# elif defined(_WIN64)
- __debugbreak();
-# elif defined(_MSC_VER)
- _asm {int 3}
-# else
- DebugBreak();
-# endif
-#if defined(_WIN32)
- ExitProcess(1);
-#else
- abort();
-#endif
}
/*
* Local Variables: