[LLVMbugs] [Bug 5606] New: poor recovery on invalid switch expression

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Nov 24 14:43:40 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=5606

           Summary: poor recovery on invalid switch expression
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: quality-of-implementation
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu


--
ddunbar at lordcrumb:tmp$ cat t.c
int f0(int var) {
  switch (va) {
  case 1:
    break;
  case 2:
    return 1;
  }
  return 2;
}

ddunbar at lordcrumb:tmp$ clang t.c
t.c:2:11: error: use of undeclared identifier 'va'
  switch (va) {
          ^
t.c:3:3: error: 'case' statement not in switch statement
  case 1:
  ^
t.c:5:3: error: 'case' statement not in switch statement
  case 2:
  ^
3 diagnostics generated.
ddunbar at lordcrumb:tmp$ 
--


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list