[llvm-bugs] [Bug 45488] New: implement -Wunused-but-set-variable
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 9 11:03:19 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45488
Bug ID: 45488
Summary: implement -Wunused-but-set-variable
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: ndesaulniers at google.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk, srhines at google.com
Clang doesn't warn on:
void foo(int x) {
int a = 0;
if (x)
a = 1;
}
GCC warns with -Wunused-but-set-variable:
warning: variable 'a' set but not used [-Wunused-but-set-variable]
--
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/20200409/aedb03e6/attachment.html>
More information about the llvm-bugs
mailing list