Index: generic/nsf.c =================================================================== diff -u -re48161ab167236344f7d23da3e855c31d1a1ebc7 -r958b24f921951c5e7c3f454134ddf17843df22bc --- generic/nsf.c (.../nsf.c) (revision e48161ab167236344f7d23da3e855c31d1a1ebc7) +++ generic/nsf.c (.../nsf.c) (revision 958b24f921951c5e7c3f454134ddf17843df22bc) @@ -1074,7 +1074,7 @@ memcpy(pcPtr->objv + from, source, sizeof(Tcl_Obj *) * (size_t)elts); memset(pcPtr->flags + from, 0, sizeof(int) * (size_t)elts); - pcPtr->objc += (TCL_SIZE_T)elts; + pcPtr->objc = pcPtr->objc + (int)elts; /*NsfPrintObjv("AFTER: ", pcPtr->objc, pcPtr->full_objv);*/ } @@ -8810,10 +8810,10 @@ case CHECK_POST: result = AssertionCheckList(interp, object, procs->post, method); break; - case CHECK_ALL: NSF_FALL_THROUGH; /* fall through */ - case CHECK_NONE: NSF_FALL_THROUGH; /* fall through */ - case CHECK_CLINVAR: NSF_FALL_THROUGH; /* fall through */ - case CHECK_OBJINVAR: NSF_FALL_THROUGH; /* fall through */ + case CHECK_ALL: ;NSF_FALL_THROUGH; /* fall through */ + case CHECK_NONE: ;NSF_FALL_THROUGH; /* fall through */ + case CHECK_CLINVAR: ;NSF_FALL_THROUGH; /* fall through */ + case CHECK_OBJINVAR: ;NSF_FALL_THROUGH; /* fall through */ case CHECK_INVAR: break; } @@ -15632,9 +15632,11 @@ if ((Tcl_Interp *)procPtr->iPtr != interp || procPtr->bodyPtr == NULL || procPtr->refCount < 1 +#ifdef PRE9 || procPtr->numArgs < 0 - || procPtr->numArgs > 10000 || procPtr->numCompiledLocals < 0 +#endif + || procPtr->numArgs > 10000 || procPtr->numCompiledLocals > 10000 ) { fprintf(stderr, "################### do NOT trust cached procPtr %p of %s " @@ -25983,11 +25985,11 @@ return TCL_OK; } - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdTypeIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdTypeIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26091,17 +26093,17 @@ Tcl_SetObjResult(interp, resultObj); break; } - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26131,19 +26133,19 @@ } } break; - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26168,19 +26170,19 @@ Tcl_SetObjResult(interp, resultObj); } break; - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26240,17 +26242,17 @@ Tcl_SetObjResult(interp, resultObj); } break; - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26312,18 +26314,18 @@ break; } - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26353,19 +26355,19 @@ break; } - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdOriginIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdOriginIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -26394,18 +26396,18 @@ case InfomethodsubcmdOriginIdx: break; - case InfomethodsubcmdArgsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdBodyIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDefinitionhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdExistsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdParameterIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPostconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdPreconditionIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdRegistrationhandleIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdReturnsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSubmethodsIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdSyntaxIdx: NSF_FALL_THROUGH; /* fall through */ - case InfomethodsubcmdDisassembleIdx: NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdArgsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdBodyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDefinitionhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdExistsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdParameterIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPostconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdPreconditionIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdRegistrationhandleIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSubmethodsIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdSyntaxIdx: ;NSF_FALL_THROUGH; /* fall through */ + case InfomethodsubcmdDisassembleIdx: ;NSF_FALL_THROUGH; /* fall through */ case InfomethodsubcmdNULL: break; } @@ -28189,7 +28191,7 @@ switch (option) { - case ConfigureoptionDebugIdx: NSF_FALL_THROUGH; /* fall through */ + case ConfigureoptionDebugIdx: ;NSF_FALL_THROUGH; /* fall through */ case ConfigureoptionObjectsystemsIdx: /* * Handled above. @@ -29003,7 +29005,7 @@ switch (withProtection) { case ProtectionCall_protectedIdx: flags = NSF_CMD_CALL_PROTECTED_METHOD; break; case ProtectionRedefine_protectedIdx: flags = NSF_CMD_REDEFINE_PROTECTED_METHOD; break; - case ProtectionNoneIdx: NSF_FALL_THROUGH; /* fall through */ + case ProtectionNoneIdx: ;NSF_FALL_THROUGH; /* fall through */ case ProtectionNULL: flags = 0u; break; @@ -29435,11 +29437,11 @@ case MethodpropertyExistsIdx: Tcl_SetObjResult(interp, Tcl_NewIntObj(1)); break; - case MethodpropertyClass_onlyIdx: NSF_FALL_THROUGH; /* fall through */ - case MethodpropertyCall_privateIdx: NSF_FALL_THROUGH; /* fall through */ - case MethodpropertyCall_protectedIdx: NSF_FALL_THROUGH; /* fall through */ - case MethodpropertyDebugIdx: NSF_FALL_THROUGH; /* fall through */ - case MethodpropertyDeprecatedIdx: NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyClass_onlyIdx: ;NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyCall_privateIdx: ;NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyCall_protectedIdx: ;NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyDebugIdx: ;NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyDeprecatedIdx: ;NSF_FALL_THROUGH; /* fall through */ case MethodpropertyRedefine_protectedIdx: { int impliedSetFlag = 0, impliedClearFlag = 0; @@ -29466,8 +29468,8 @@ case MethodpropertyRedefine_protectedIdx: flag = NSF_CMD_REDEFINE_PROTECTED_METHOD; break; - case MethodpropertyNULL: NSF_FALL_THROUGH; /* fall through */ - case MethodpropertyReturnsIdx: NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyNULL: ;NSF_FALL_THROUGH; /* fall through */ + case MethodpropertyReturnsIdx: ;NSF_FALL_THROUGH; /* fall through */ case MethodpropertyExistsIdx: flag = 0u; break; @@ -30784,7 +30786,7 @@ * or handling other simple cases. */ switch (type) { - case RelationtypeObject_filterIdx: NSF_FALL_THROUGH; /* fall through */ + case RelationtypeObject_filterIdx: ;NSF_FALL_THROUGH; /* fall through */ case RelationtypeObject_mixinIdx: if (valueObj == NULL) { objopt = object->opt; @@ -30800,7 +30802,7 @@ objopt = NsfRequireObjectOpt(object); break; - case RelationtypeClass_mixinIdx: NSF_FALL_THROUGH; /* fall through */ + case RelationtypeClass_mixinIdx: ;NSF_FALL_THROUGH; /* fall through */ case RelationtypeClass_filterIdx: assert(class != NULL); if (valueObj == NULL) { @@ -31010,9 +31012,9 @@ } break; - case RelationtypeClassIdx: NSF_FALL_THROUGH; /* fall through */ - case RelationtypeRootclassIdx: NSF_FALL_THROUGH; /* fall through */ - case RelationtypeSuperclassIdx: NSF_FALL_THROUGH; /* fall through */ + case RelationtypeClassIdx: ;NSF_FALL_THROUGH; /* fall through */ + case RelationtypeRootclassIdx: ;NSF_FALL_THROUGH; /* fall through */ + case RelationtypeSuperclassIdx: ;NSF_FALL_THROUGH; /* fall through */ case RelationtypeNULL: /* handled above */ break; @@ -31077,7 +31079,7 @@ assert(object != NULL); switch (option) { - case CurrentoptionMethodIdx: NSF_FALL_THROUGH; /* fall through */ + case CurrentoptionMethodIdx: ;NSF_FALL_THROUGH; /* fall through */ case CurrentoptionProcIdx: cscPtr = CallStackGetTopFrame0(interp); if (cscPtr != NULL) { @@ -31242,7 +31244,7 @@ break; } - case CurrentoptionObjectIdx: NSF_FALL_THROUGH; /* fall through */ + case CurrentoptionObjectIdx: ;NSF_FALL_THROUGH; /* fall through */ case CurrentoptionNULL: /* handled above */ break; Index: generic/nsfInt.h =================================================================== diff -u -re48161ab167236344f7d23da3e855c31d1a1ebc7 -r958b24f921951c5e7c3f454134ddf17843df22bc --- generic/nsfInt.h (.../nsfInt.h) (revision e48161ab167236344f7d23da3e855c31d1a1ebc7) +++ generic/nsfInt.h (.../nsfInt.h) (revision 958b24f921951c5e7c3f454134ddf17843df22bc) @@ -353,9 +353,17 @@ # include #endif +#ifdef PRE9 +# define NSF_PLAUSIBLE_REFCOUNT(A) ((A)->refCount >= 0) +# define NSF_PLAUSIBLE_LENGTH(A) ((A)->length >= 0) +#else +# define NSF_PLAUSIBLE_REFCOUNT(A) ((A)->refCount < (size_t)-100) +# define NSF_PLAUSIBLE_LENGTH(A) ((A)->length < (size_t)-100) +#endif + #if !defined(NDEBUG) # define ISOBJ(o) ((o) != NULL && ISOBJ_(o)) -# define ISOBJ_(o) ((o) != (void*)0xdeadbeaf && (((o)->typePtr != NULL) ? ((o)->typePtr->name != NULL) : ((o)->bytes != NULL)) && (((o)->bytes != NULL) ? (o)->length >= 0 : 1) && (o)->refCount >= 0u) +# define ISOBJ_(o) ((o) != (void*)0xdeadbeaf && (((o)->typePtr != NULL) ? ((o)->typePtr->name != NULL) : ((o)->bytes != NULL)) && (((o)->bytes != NULL) ? NSF_PLAUSIBLE_LENGTH(o) : 1) && NSF_PLAUSIBLE_REFCOUNT(o)) #else # define ISOBJ(o) #endif @@ -373,10 +381,10 @@ #ifdef USE_TCL_STUBS # define DECR_REF_COUNT(A) \ - MEM_COUNT_FREE("INCR_REF_COUNT" #A,(A)); assert((A)->refCount >= 0); \ + MEM_COUNT_FREE("INCR_REF_COUNT" #A,(A)); assert(NSF_PLAUSIBLE_REFCOUNT(A)); \ Tcl_DecrRefCount(A) # define DECR_REF_COUNT2(name,A) \ - MEM_COUNT_FREE("INCR_REF_COUNT-" name,(A)); assert((A)->refCount >= 0); \ + MEM_COUNT_FREE("INCR_REF_COUNT-" name,(A)); assert(NSF_PLAUSIBLE_REFCOUNT(A)); \ Tcl_DecrRefCount(A) #else # define DECR_REF_COUNT(A) \