[cfe-dev] clang compile error on mingw / gcc 3.4.5

Ronald Pijnacker pijnacker at dse.nl
Thu Jul 9 23:52:54 PDT 2009


Hi all,

I am trying to get llvm / clang to build on mingw with support for objc.
Building llvm (svn trunk) went quite smoothly, however building clang gave
me the following error:

d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp: In member function `clang::FieldRegion* clang::MemRegionManager::getFieldRegion(const clang::FieldDecl*, const clang::MemRegion*)':
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp:301: error: call of overloaded `getRegion(const clang::FieldDecl*&, const clang::MemRegion*&)' is ambiguous
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:736: note: candidates are: RegionTy* clang::MemRegionManager::getRegion(A1, const clang::MemRegion*) [with RegionTy = clang::FieldRegion, A1 = const clang::FieldDecl*]
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:753: note:                 RegionTy* clang::MemRegionManager::getRegion(A1, A2) [with RegionTy = clang::FieldRegion, A1 = const clang::FieldDecl*, A2 = const clang::MemRegion*]

d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp: In member function `clang::ObjCIvarRegion* clang::MemRegionManager::getObjCIvarRegion(const clang::ObjCIvarDecl*, const clang::MemRegion*)':
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp:307: error: call of overloaded `getRegion(const clang::ObjCIvarDecl*&, const clang::MemRegion*&)' is ambiguous
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:736: note: candidates are: RegionTy* clang::MemRegionManager::getRegion(A1, const clang::MemRegion*) [with RegionTy = clang::ObjCIvarRegion, A1 = const clang::ObjCIvarDecl*]
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:753: note:                 RegionTy* clang::MemRegionManager::getRegion(A1, A2) [with RegionTy = clang::ObjCIvarRegion, A1 = const clang::ObjCIvarDecl*, A2 = const clang::MemRegion*]

d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp: In member function `clang::ObjCObjectRegion* clang::MemRegionManager::getObjCObjectRegion(const clang::ObjCInterfaceDecl*, const clang::MemRegion*)':
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp:313: error: call of overloaded `getRegion(const clang::ObjCInterfaceDecl*&, const clang::MemRegion*&)' is ambiguous
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:736: note: candidates are: RegionTy* clang::MemRegionManager::getRegion(A1, const clang::MemRegion*) [with RegionTy = clang::ObjCObjectRegion, A1 = const clang::ObjCInterfaceDecl*]
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:753: note:                 RegionTy* clang::MemRegionManager::getRegion(A1, A2) [with RegionTy = clang::ObjCObjectRegion, A1 = const clang::ObjCInterfaceDecl*, A2 = const clang::MemRegion*]

d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp: In member function `clang::TypedViewRegion* clang::MemRegionManager::getTypedViewRegion(clang::QualType, const clang::MemRegion*)':
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/MemRegion.cpp:318: error: call of overloaded `getRegion(clang::QualType&, const clang::MemRegion*&)' is ambiguous
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:736: note: candidates are: RegionTy* clang::MemRegionManager::getRegion(A1, const clang::MemRegion*) [with RegionTy = clang::TypedViewRegion, A1 = clang::QualType]
d:/data/llvm/llvm-svn/tools/clang/lib/Analysis/../../include/clang/Analysis/PathSensitive/MemRegion.h:753: note:                 RegionTy* clang::MemRegionManager::getRegion(A1, A2) [with RegionTy = clang::TypedViewRegion, A1 = clang::QualType, A2 = const clang::MemRegion*]

make[4]: *** [/data/llvm/llvm-svn.bin/tools/clang/lib/Analysis/Release/MemRegion.o] Error 1
make[4]: Leaving directory `/data/llvm/llvm-svn.bin/tools/clang/lib/Analysis'
make[3]: *** [Analysis/.makeall] Error 2
make[3]: *** Waiting for unfinished jobs....

I traced this back in svn to revisions 73917 and 73921, where this was changed.
It seems as if gcc 3.4.5 isn't able to deal with the used template construct.

Best regards,

Ronald



More information about the cfe-dev mailing list