From: Jonathan Wakely Date: Thu, 16 Jul 2020 10:44:32 +0000 (+0100) Subject: analyzer: Use noexcept instead of throw() for C++11 and later (PR 96014) X-Git-Tag: basepoints/gcc-12~6075 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75edc31f9ebe7f8b933860981a124f7f0993214b;p=thirdparty%2Fgcc.git analyzer: Use noexcept instead of throw() for C++11 and later (PR 96014) gcc/testsuite/ChangeLog: PR testsuite/96014 * g++.dg/analyzer/pr94028.C: Replace dynamic exception specification with noexcept-specifier for C++11 and later. --- diff --git a/gcc/testsuite/g++.dg/analyzer/pr94028.C b/gcc/testsuite/g++.dg/analyzer/pr94028.C index c0c35d65829f..5c8e2c9b286b 100644 --- a/gcc/testsuite/g++.dg/analyzer/pr94028.C +++ b/gcc/testsuite/g++.dg/analyzer/pr94028.C @@ -12,7 +12,12 @@ enum e {} i; struct j { - void *operator new (__SIZE_TYPE__ b) throw() + void *operator new (__SIZE_TYPE__ b) +#if __cplusplus >= 201103L + noexcept +#else + throw() +#endif { return calloc (b, sizeof (int)); // { dg-warning "leak" } }