[llvm-bugs] [Bug 28782] New: possible ms extension: declaration after label

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 30 11:53:08 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28782

            Bug ID: 28782
           Summary: possible ms extension: declaration after label
           Product: clang
           Version: 3.8
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jay.foad at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I noticed this difference between cl (VS 2015 update 3) and clang-cl (3.8.1):

$ cat lab.c
void f(int i) {
foo: int n;
switch(i) {
case 0: int m;
}
}

$ cl /c lab.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24210 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

lab.c

$ clang-cl /c lab.c
lab.c(2,6) :  error: expected expression
foo: int n;
     ^
lab.c(4,9) :  error: expected expression
case 0: int m;
        ^
2 errors 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/20160730/d5f220b2/attachment.html>


More information about the llvm-bugs mailing list