This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69850] [6 Regression] unnecessary -Wnonnull-compare warning
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Feb 2016 09:44:50 +0000
- Subject: [Bug c++/69850] [6 Regression] unnecessary -Wnonnull-compare warning
- Auto-submitted: auto-generated
- References: <bug-69850-4 at http dot gcc dot gnu dot org/bugzilla/>
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