[LLVMbugs] [Bug 18877] New: No -Wempty-body warning for empty body with a prefix label
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 17 21:04:50 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18877
Bug ID: 18877
Summary: No -Wempty-body warning for empty body with a prefix
label
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
For the following statement:
if (i) a:;
Clang does not warn that the body is empty.
$: cat s.c
void f(int i) {
if (i) a:;
}
$: clang-trunk -Wempty-body -c s.c
$: gcc-trunk -Wempty-body -c s.c
s.c: In function ‘f’:
s.c:2:12: warning: suggest braces around empty body in an ‘if’ statement
[-Wempty-body]
if (i) a:;
^
$: clang-trunk --version
clang version 3.5 (trunk 201498)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$
--
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/20140218/6e516808/attachment.html>
More information about the llvm-bugs
mailing list