[llvm-bugs] [Bug 44610] New: -Wparentheses warning for accidental assignment
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 21 15:39:27 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44610
Bug ID: 44610
Summary: -Wparentheses warning for accidental assignment
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: leonardchan at google.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
For the following code:
```
int main() {
int i;
const char *str = (i = 2) ? "edge" : "level";
(void)str;
return 0;
}
```
It would be nice to warn on the conditional assignment as a part of
-Wparentheses. GCC's -Wparentheses doesn't seem to warn on this either.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200121/58e905d0/attachment.html>
More information about the llvm-bugs
mailing list