From 039a630d787dc18c76b81f08a322ba1e0d91082d Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 30 Jun 2020 17:40:08 +0100 Subject: [PATCH] analyzer: Fix -Wanalyzer-possible-null-argument warning (PR 96014) gcc/testsuite/ChangeLog: PR testsuite/96014 * g++.dg/analyzer/pr94028.C: Make operator new non-throwing so that the compiler doesn't implicitly mark it as returning non-null. --- gcc/testsuite/g++.dg/analyzer/pr94028.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g++.dg/analyzer/pr94028.C b/gcc/testsuite/g++.dg/analyzer/pr94028.C index 0a222d1b991..c0c35d65829 100644 --- a/gcc/testsuite/g++.dg/analyzer/pr94028.C +++ b/gcc/testsuite/g++.dg/analyzer/pr94028.C @@ -12,7 +12,7 @@ enum e {} i; struct j { - void *operator new (__SIZE_TYPE__ b) + void *operator new (__SIZE_TYPE__ b) throw() { return calloc (b, sizeof (int)); // { dg-warning "leak" } } -- 2.30.2