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: unassignedclangb...@nondot.org
Reporter: leonardc...@google.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs