This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69850] [6 Regression] unnecessary -Wnonnull-compare warning


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69850

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 37728
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37728&action=edit
unreduced testcase

trippels@gcc2-power8 llvm_build % g++ -Wnonnull-compare -Werror -c 
VariantValue.ii
In file included from
/home/trippels/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h:19:0,
                 from
/home/trippels/llvm/tools/clang/include/clang/Basic/Diagnostic.h:18,
                 from
/home/trippels/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h:19,
                 from
/home/trippels/llvm/tools/clang/include/clang/AST/DeclarationName.h:17,
                 from
/home/trippels/llvm/tools/clang/include/clang/AST/DeclBase.h:18,
                 from
/home/trippels/llvm/tools/clang/include/clang/AST/Decl.h:18,
                 from
/home/trippels/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h:20,
                 from
/home/trippels/llvm/tools/clang/include/clang/AST/ASTContext.h:18,
                 from
/home/trippels/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h:48,
                 from
/home/trippels/llvm/tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h:20,
                 from
/home/trippels/llvm/tools/clang/lib/ASTMatchers/Dynamic/VariantValue.cpp:15:
/home/trippels/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h: In member function
âvoid llvm::RefCountedBaseVPTR::Release() constâ:
/home/trippels/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:79:38: error: nonnull
argument âthisâ compared to NULL [-Werror=nonnull-compare]
       if (--ref_cnt == 0) delete this;
                                      ^
cc1plus: all warnings being treated as errors

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]