Overview
| Artifact ID: | 7c7fa408300011289b943f3dec1e3fa3d0b743deaf929cb21d9bdf814ce71db9 |
|---|---|
| Ticket: | aa6624c6292064e76efe93bfb810545a82ad1d3d
tclExecute.c: Avoid false-positive warning |
| User & Date: | chrstphrchvz on 2024-02-16 12:12:45 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- 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. - foundin changed to: "core-8-6-branch"
- is_private changed to: "0"
- login: "chrstphrchvz"
- priority changed to: "5 Medium"
- private_contact changed to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "chrstphrchvz"
- subsystem changed to: "53. Configuration and Build Tools"
- title changed to: "tclExecute.c: Avoid false-positive warning"
- type changed to: "Patch"