[LLVMdev] Compiler warnings with gcc-4.7.1
Yuri
yuri at rawbw.com
Tue Jun 26 17:15:18 PDT 2012
I just switched gcc from 4.6.2 to 4.7.1 and see the massive amount of
warnings, see few examples below.
They mostly didn't exist with gcc-4.6.2.
rev.159224
Yuri
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:56:10:
warning: enumeral mismatch in conditional expression:
‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*> >::<anonymous enum>’ vs
‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> >::<anonymous
enum>’
[-Wenum-compare]/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:56:10:
warning: enumeral mismatch in conditional expression:
‘llvm::PointerLikeTypeTraits<const clang::Type*>::<anonymous enum>’ vs
‘llvm::PointerLikeTypeTraits<clang::TypeSourceInfo*>::<anonymous enum>’
[-Wenum-compare]
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:
In instantiation of ‘class
llvm::PointerUnionUIntTraits<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*>,
llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> >’:
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerIntPair.h:43:8:
required from ‘class llvm::PointerIntPair<void*, 1u, bool,
llvm::PointerUnionUIntTraits<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*>,
llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> > >’
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:84:11:
required from ‘class
llvm::PointerUnion<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*>,
llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> >’
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:347:11:
required from ‘class llvm::PointerUnion4<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*,
clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*>’
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/tools/clang/tools/libclang/../../include/clang/AST/Decl.h:1507:5:
required from here
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:56:10:
warning: comparison between ‘enum
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*> >::<anonymous>’ and ‘enum
llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> >::<anonymous>’
[-Wenum-compare]
/usr/home/yuri/llvm-2012-06/latest-unpatched/llvm-fix/include/llvm/ADT/PointerUnion.h:56:10:
warning: enumeral mismatch in conditional expression:
‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateDecl*,
clang::MemberSpecializationInfo*> >::<anonymous enum>’ vs
‘llvm::PointerLikeTypeTraits<llvm::PointerUnion<clang::FunctionTemplateSpecializationInfo*,
clang::DependentFunctionTemplateSpecializationInfo*> >::<anonymous
enum>’ [-Wenum-compare]
More information about the llvm-dev
mailing list