[llvm-bugs] [Bug 42056] New: missing warning diagnosis for empty expression statement
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 29 04:56:34 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42056
Bug ID: 42056
Summary: missing warning diagnosis for empty expression
statement
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: tangyixuan at mail.dlut.edu.cn
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Clang does not warn to remove the empty expression statement with the warning
flag [-Wextra-semi].
For the following example, Clang does not warn to remove the empty expression
statement with the warning flag [-Wextra-semi].
$ cat s.c
int main()
{
int a = 0;
;
return 0;
}
$ clang --version
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang -Wextra-semi s.c
No warning generated.
Under the same workstation:
$ clang-8.0 --Wextra-semi-stmt s.c
s.c:4:5: warning: empty expression statement has no effect; remove unnecessary
';' to silence this warning [-Wextra-semi-stmt]
;
^
1 warning generated.
--
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/20190529/a745bef5/attachment-0001.html>
More information about the llvm-bugs
mailing list