[Issue 22415] New: importC: Deprecation: switch case fallthrough - use 'goto case;' if intended

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 17 22:44:15 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22415

          Issue ID: 22415
           Summary: importC: Deprecation: switch case fallthrough - use
                    'goto case;' if intended
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Deprecation warning is D-specific, and doesn't apply to C11 semantic rules.
---
int test(int a)
{
    switch (a)
    {
        case 0:
            a = 1;
        case 1:
            return a;
        case 2:
        default:
            return -1;
    }
}

--


More information about the Digitalmars-d-bugs mailing list