[LLVMbugs] [Bug 12030] New: -Wparenthesis doesn't detect "ambiguous else" bugs like gcc does

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 17 14:33:09 PST 2012


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

             Bug #: 12030
           Summary: -Wparenthesis doesn't detect "ambiguous else" bugs
                    like gcc does
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: davezarzycki at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


-Wparenthesis doesn't detect "ambiguous else" bugs like gcc does

>From the GCC man page:

{
  if (a)
    if (b)
      foo();
  else
    bar();
}

>From GCC (but not clang):

test.c:3: warning: suggest explicit braces to avoid ambiguous ‘else’

-- 
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