diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclDecls.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 75483a7..b03e114 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4349,7 +4349,9 @@ extern const TclStubs *tclStubsPtr; #undef Tcl_GetIndexFromObjStruct #undef Tcl_GetBooleanFromObj #undef Tcl_GetBoolean -#ifdef __GNUC__ +#if !defined(__cplusplus) && !defined(BUILD_tcl) && !defined(BUILD_tk) +# define TCLBOOLWARNING(boolPtr) (void)(sizeof(struct {_Static_assert(sizeof(*(boolPtr)) <= sizeof(int), "sizeof(boolPtr) too large");int dummy;})), +#elif defined(__GNUC__) /* If this gives: "error: size of array ‘_boolVar’ 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 |