[LLVMbugs] [Bug 7639] New: -Wempty-body is enabled by default

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 14 00:28:20 PDT 2010


           Summary: -Wempty-body is enabled by default
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ojab at ojab.ru
                CC: llvmbugs at cs.uiuc.edu

gcc hasn't -Wempty-body enabled by default (only if explicit declared or
-Wextra), but clang has. So clang produces warnings like:

Wempty-body.c:2:8: warning: if statement has empty body [-Wempty-body]

while gcc compiles code silently.

It prevents using clang as drop-in replacement for gcc if project has -Werror

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