Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 99e69c926f0e9a1b6be9b1c9c883f524fae71ede
Ticket: 3545875fffffffffffffffffffffffffffffffff
Mac OSX clang compiler warning
User & Date: dgp on 2012-07-19 13:37:35
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  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. foundin changed to: "obsolete: 8.5.12"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "47. Bytecode Compiler"
  11. title changed to: "Mac OSX clang compiler warning"
  12. type changed to: "Bug"