[LLVMbugs] [Bug 18713] New: -Wextra-semi catches a a semicolon after a function, but not after a loop or conditional
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Mon Feb  3 10:47:55 PST 2014
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=18713
            Bug ID: 18713
           Summary: -Wextra-semi catches a a semicolon after a function,
                    but not after a loop or conditional
           Product: clang
           Version: 3.4
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: htam at apple.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified
This file should generate another Wextra-semi warning after the for and if.
$ cat foo.c
#include <stdio.h>
void foo(int);
void foo(int j) {
   int i;
   for (i = 0; i < 100; i += 1) {
       printf("%d\n", i);
   };
   if (j != 2) {
       printf("%d\n", j);
   };
};
$ clang foo.c -c -o /dev/null -Weverything
foo.c:13:2: warning: extra ';' outside of a function [-Wextra-semi]
};
^
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/20140203/d9c346ba/attachment.html>
    
    
More information about the llvm-bugs
mailing list