Overview
| Artifact ID: | e15166be8252ec1954ede0c4cc9675ef98efc53bcae5adc945bce1289ed33f77 |
|---|---|
| Ticket: | 3545875fffffffffffffffffffffffffffffffff
Mac OSX clang compiler warning |
| User & Date: | chrstphrchvz on 2022-08-19 08:52:01 |
Changes
- closedate changed to: "2459810.86945867"
- closer changed to: "chrstphrchvz"
- comment changed to:
Forwarded from Gustaf Neumann: % clang --version Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) /usr/local/src/tcl8.5.12/unix/../generic/tclExecute.c:727:22: warning: array index of '-1' indexes before the beginning of the array [-Warray-bounds] esPtr->tosPtr = &esPtr->stackWords[-1]; ^ ~~ /usr/local/src/tcl8.5.12/unix/../generic/tclInt.h:1319:5: note: array 'stackWords' declared here Tcl_Obj *stackWords[1]; ^ /usr/local/src/tcl8.5.12/unix/../generic/tclExecute.c:939:31: warning: array index of '-1' indexes before the beginning of the array [-Warray-bounds] currElems = esPtr->endPtr - &esPtr->stackWords[-1]; ^ ~~ /usr/local/src/tcl8.5.12/unix/../generic/tclInt.h:1319:5: note: array 'stackWords' declared here Tcl_Obj *stackWords[1]; ^ /usr/local/src/tcl8.5.12/unix/../generic/tclExecute.c:940:45: warning: array index of '-1' indexes before the beginning of the array [-Warray-bounds] if (esPtr->markerPtr || (esPtr->tosPtr != &esPtr->stackWords[-1])) { ^ ~~ /usr/local/src/tcl8.5.12/unix/../generic/tclInt.h:1319:5: note: array 'stackWords' declared here Tcl_Obj *stackWords[1]; ^ /usr/local/src/tcl8.5.12/unix/../generic/tclExecute.c:952:31: warning: array index of '-1' indexes before the beginning of the array [-Warray-bounds] currElems = esPtr->endPtr - &esPtr->stackWords[-1]; ^ ~~ /usr/local/src/tcl8.5.12/unix/../generic/tclInt.h:1319:5: note: array 'stackWords' declared here Tcl_Obj *stackWords[1]; ^ /usr/local/src/tcl8.5.12/unix/../generic/tclExecute.c:1094:22: warning: array index of '-1' indexes before the beginning of the array [-Warray-bounds] esPtr->tosPtr = &esPtr->stackWords[-1]; ^ ~~ /usr/local/src/tcl8.5.12/unix/../generic/tclInt.h:1319:5: note: array 'stackWords' declared here Tcl_Obj *stackWords[1]; ^ 5 warnings generated. If there's a sensible way to make the code better without negative indexing, it will quiet the compiler. Not urgent. - icomment:
Closing: this was ultimately addressed by [49a45d782ef9] for 8.5 and by [f5a69fee4db2] for 8.6.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"