From 12a0e1ad7c9ccf96e946d02b63a5280393b4f7cf Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 18 Sep 2024 17:51:31 +0200 Subject: [PATCH] closes tcl-[f6fc75cbdd0fa593]: silence unknown pragma warning for no-trapv (__GNUC__ is also defined by clang) --- generic/tclClockFmt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c index 1af0c68..851a78d 100644 --- a/generic/tclClockFmt.c +++ b/generic/tclClockFmt.c @@ -95,7 +95,7 @@ _str2wideInt_no( } /* int & Tcl_WideInt overflows may happens here (expected case) */ -#if defined(__GNUC__) || defined(__GNUG__) +#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) # pragma GCC optimize("no-trapv") #endif @@ -187,7 +187,7 @@ TclAtoWIe( return _str2wideInt(out, p, e, sign); } -#if defined(__GNUC__) || defined(__GNUG__) +#if (defined(__GNUC__) || defined(__GNUG__)) && !defined(__clang__) # pragma GCC reset_options #endif