Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e15166be8252ec1954ede0c4cc9675ef98efc53bcae5adc945bce1289ed33f77
Ticket: 3545875fffffffffffffffffffffffffffffffff
Mac OSX clang compiler warning
User & Date: chrstphrchvz on 2022-08-19 08:52:01
Changes

  1. closedate changed to: "2459810.86945867"
  2. closer changed to: "chrstphrchvz"
  3. 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.
    
  4. icomment:
    Closing: this was ultimately addressed by [49a45d782ef9] for 8.5 and by [f5a69fee4db2] for 8.6.
    
  5. login: "chrstphrchvz"
  6. mimetype: "text/x-fossil-wiki"
  7. resolution changed to: "Fixed"
  8. severity changed to: "Minor"
  9. status changed to: "Closed"