[LLVMbugs] [Bug 13141] New: Precompiled header rejected because of duplicated identical definition

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 18 13:19:40 PDT 2012


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

             Bug #: 13141
           Summary: Precompiled header rejected because of duplicated
                    identical definition
           Product: clang
           Version: trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: l.lunak at suse.cz
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


$ cat a.cpp
#include "a.h"
#include <vector>
$ cat a.h
#ifdef FOO
#include <vector>
#endif
$ clang++ -x c++-header a.h -o a.h.pch -DFOO
$ clang++ a.cpp -include-pch a.h.pch -DFOO -DFOO -c
error: definition of macro 'FOO' conflicts with an identifier used in the
precompiled header
1 error generated.

Removal of the duplicate -DFOO of course avoids the problem, but redefinition
to an identical value is a no-op and should be ignored (and with a complex
build system avoiding such harmless duplicates can be annoying at the very
least).

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