http://llvm.org/bugs/show_bug.cgi?id=18877

Chengnian Sun <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Chengnian Sun <[email protected]> ---
(In reply to comment #1)
> Right. This warning is to detect the 'stray semicolon' bug:
> 
>   if (foo);
>     blah;
> 
> The labelled semicolon case doesn't match this pattern.

Hi Richard, 

Thanks. I understand why it is not warned, but I do not understand why the
given test case with an empty body does not fit into -Wempty-body. 

The pattern makes sense, but is it a little conservative? For the if statement
"if (i) a:;", the programmer cannot easily find out that it is an empty
statement due to the labelled semicolon, which is equally bad to the stray
semicolon.

-- 
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