[LLVMbugs] [Bug 18621] New: Allow labels to be between [[clang::fallthrough]] and next switch case

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jan 26 00:47:08 PST 2014


            Bug ID: 18621
           Summary: Allow labels to be between [[clang::fallthrough]] and
                    next switch case
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: joepeck02 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11943
  --> http://llvm.org/bugs/attachment.cgi?id=11943&action=edit
[TEST] Example file

See attached test case.

    void doSomething(char c)
        switch (c) {
            case 'a':

The label "label" above is between the cases and causes the clang::fallthrough
not at end warning:

    label.cpp:9:13: warning: fallthrough annotation does not directly precede
switch label [-Wimplicit-fallthrough]
    1 warning generated.

It would be much nicer if the fall through was allowed before the label. After
the feels weird here.

See also:

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/20140126/068ba757/attachment.html>

More information about the llvm-bugs mailing list