Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7c7fa408300011289b943f3dec1e3fa3d0b743deaf929cb21d9bdf814ce71db9
Ticket: aa6624c6292064e76efe93bfb810545a82ad1d3d
tclExecute.c: Avoid false-positive warning
User & Date: chrstphrchvz on 2024-02-16 12:12:45
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    LLVM.org Clang 17 emits is a false positive <tt>-Wconstant-logical-operand</tt> warning when using <tt>-std=c2x</tt> (reported at [https://github.com/llvm/llvm-project/issues/64356]):
    
    <pre>
    tcl86/generic/tclExecute.c:9192:4: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
     9192 |                         || (sizeof(Tcl_WideInt) < 2*sizeof(long))) {
          |                         ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    tcl86/generic/tclExecute.c:9192:4: note: use '|' for a bitwise operation
     9192 |                         || (sizeof(Tcl_WideInt) < 2*sizeof(long))) {
          |                         ^~
          |                         |
    </pre>
    
    This will be fixed in future Clang, but I would suggest reordering affected expressions as a workaround to avoid anyone else complaining about this. See attached patch.
    
  5. foundin changed to: "core-8-6-branch"
  6. is_private changed to: "0"
  7. login: "chrstphrchvz"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "chrstphrchvz"
  14. subsystem changed to: "53. Configuration and Build Tools"
  15. title changed to: "tclExecute.c: Avoid false-positive warning"
  16. type changed to: "Patch"