GCC with patches for OS216
Revision | 039a630d787dc18c76b81f08a322ba1e0d91082d (tree) |
---|---|
Time | 2020-07-02 04:21:34 |
Author | Jonathan Wakely <jwakely@redh...> |
Commiter | Jonathan Wakely |
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.
@@ -12,7 +12,7 @@ enum e {} i; | ||
12 | 12 | |
13 | 13 | struct j |
14 | 14 | { |
15 | - void *operator new (__SIZE_TYPE__ b) | |
15 | + void *operator new (__SIZE_TYPE__ b) throw() | |
16 | 16 | { |
17 | 17 | return calloc (b, sizeof (int)); // { dg-warning "leak" } |
18 | 18 | } |