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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to