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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 6 10:26:11 PDT 2012


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

Jordan Rose <jordan_rose at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jordan_rose at apple.com
           Platform|PC                          |All
         Resolution|                            |FIXED
         OS/Version|Windows NT                  |All

--- Comment #3 from Jordan Rose <jordan_rose at apple.com> 2012-06-06 12:26:11 CDT ---
Clang's warning was actually incorrect (and was based on an old incorrect
warning in GCC) -- an empty header file is fine, and a file consisting of
entirely of comments is not.

Fixed in r158085. I ended up just tracking the decls we read in to see if any
come from outside the predefines buffer. It wasn't worth ripping up our whole
implementation of target-specific builtin types just to add a warning that
almost nobody will ever see in practice.

(However, as a final note, we do have declarations that are introduced by Sema
on-demand. The only ones I can think of offhand are the classes and methods
used by the new Objective-C literals, but it's possible we could add a
target-specific hook here for __builtin_va_list and anything else that's
necessary. I agree that that would be long-term cleaner than our current
solution.)

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