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.
This commit is contained in:
parent
1617fc4479
commit
039a630d78
1 changed files with 1 additions and 1 deletions
|
@ -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" }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue