[llvm-bugs] [Bug 50478] New: [C2x] a label with a declaration should be allowed

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 26 03:16:26 PDT 2021


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

            Bug ID: 50478
           Summary: [C2x] a label with a declaration should be allowed
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C2x
          Assignee: unassignedclangbugs at nondot.org
          Reporter: haoxintu at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

Hi all.

I think this is a new feature in C2x but it seems clang still can not pass the
following code.

$cat small.c
int main(){
L: 
    int a = 0;
    return 0;
}

clang complains "error: expected expression", while GCC accepts this well.

In Godbolt: https://godbolt.org/z/KhdYxrnhf

See also in GCC's implementation: 

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353

I try to find a dup report but failed, maybe there is a dup case?

Thanks,
Haoxin

-- 
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/20210526/76a4dea5/attachment.html>


More information about the llvm-bugs mailing list