summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-02 09:10:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-02 09:10:06 (GMT)
commit32748be592b9928c5cfd2113727b5dd3fd99af38 (patch)
tree4ac05890001e8f8d02a08676f6fd08f248e1fb74
parentbfa5501a462e097131cc0696efbbfc4a1019ef52 (diff)
downloadtcl-32748be592b9928c5cfd2113727b5dd3fd99af38.zip
tcl-32748be592b9928c5cfd2113727b5dd3fd99af38.tar.gz
tcl-32748be592b9928c5cfd2113727b5dd3fd99af38.tar.bz2
Would checking for __STRICT_ANSI__ help?
-rw-r--r--generic/tclDecls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 7abb1c8..ed95922 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -4035,7 +4035,7 @@ extern const TclStubs *tclStubsPtr;
#if !defined(TCLBOOLWARNING)
#if !defined(__cplusplus) && !defined(BUILD_tcl) && !defined(BUILD_tk) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define TCLBOOLWARNING(boolPtr) (void)(sizeof(struct {_Static_assert(sizeof(*(boolPtr)) <= sizeof(int), "sizeof(boolPtr) too large");int dummy;})),
-#elif defined(__GNUC__) && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
/* If this gives: "error: size of array ‘_bool_Var’ is negative", it means that sizeof(*boolPtr)>sizeof(int), which is not allowed */
# define TCLBOOLWARNING(boolPtr) ({__attribute__((unused)) char _bool_Var[sizeof(*(boolPtr)) > sizeof(int) ? -1 : 1];}),
#else