Tcl Source Code

Check-in [c0bdbd9536]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Slightly better
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-1e48483c8b
Files: files | file ages | folders
SHA3-256: c0bdbd9536f2b001d90d111ebadb2b50fb7dadf21a640e4543117a7e8a7f4e68
User & Date: jan.nijtmans 2024-04-26 12:29:23
References
2024-04-26
12:29 Ticket [1e48483c8b] Use of non-standard C code in TCLBOOLWARNING status still Open with 3 other changes artifact: 917dd5a7a4 user: jan.nijtmans
Context
2024-04-26
12:59
Fix [1e48483c8b]: Use of non-standard C code in TCLBOOLWARNING check-in: b43de757cc user: jan.nijtmans tags: core-8-branch
12:29
Slightly better Closed-Leaf check-in: c0bdbd9536 user: jan.nijtmans tags: bug-1e48483c8b
11:27
Proposed fix for [1e48483c8b]: Use of non-standard C code in TCLBOOLWARNING check-in: 066670e431 user: jan.nijtmans tags: bug-1e48483c8b
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclDecls.h.

4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
	Tcl_GetStringFromObj(objPtr, (Tcl_Size *)NULL)
#define Tcl_GetUnicode(objPtr) \
	Tcl_GetUnicodeFromObj(objPtr, (Tcl_Size *)NULL)
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean
#if !defined(__cplusplus) && !defined(BUILD_tcl) && !defined(BUILD_tk)
#	define TCLBOOLWARNING(boolPtr) (int)(sizeof(struct {_Static_assert(sizeof(*(boolPtr)) <= sizeof(int), "sizeof(boolPtr) too large");int dummy;})*0) +
#elif defined(__GNUC__)
	/* 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
#   define TCLBOOLWARNING(boolPtr)
#endif
#if defined(USE_TCL_STUBS)







|







4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
	Tcl_GetStringFromObj(objPtr, (Tcl_Size *)NULL)
#define Tcl_GetUnicode(objPtr) \
	Tcl_GetUnicodeFromObj(objPtr, (Tcl_Size *)NULL)
#undef Tcl_GetIndexFromObjStruct
#undef Tcl_GetBooleanFromObj
#undef Tcl_GetBoolean
#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 ‘_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
#   define TCLBOOLWARNING(boolPtr)
#endif
#if defined(USE_TCL_STUBS)