[LLVMbugs] [Bug 12665] New: Fail to diagnose violation of C99 6.9 (empty translation unit)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 25 16:35:32 PDT 2012


             Bug #: 12665
           Summary: Fail to diagnose violation of C99 6.9 (empty
                    translation unit)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: weimingz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 8457
  --> http://llvm.org/bugs/attachment.cgi?id=8457
test case

C99 6.9 requires that translation unit must contain at least one external def

But clang fails to diagnose the violation.

GCC will detect it:
gcc  -std=c99 -pedantic  -c empty.c 
empty.c:7: warning: ISO C forbids an empty translation unit

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