[llvm-bugs] [Bug 42142] New: Missing switch case checking in Clang diagnostics

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 5 09:35:27 PDT 2019


            Bug ID: 42142
           Summary: Missing switch case checking in Clang diagnostics
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

void g();

void warn(char c)
  switch (c) {
  case 256: g();

Clang: No warning. 

GCC warns:
warning: case label value exceeds maximum value for type

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/20190605/c6009373/attachment.html>

More information about the llvm-bugs mailing list