aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-07-16 11:44:32 +0100
committerJonathan Wakely <jwakely@redhat.com>2020-07-16 21:24:24 +0100
commit75edc31f9ebe7f8b933860981a124f7f0993214b (patch)
tree6305900e4a8e3b255efefa620abc71cc0652d5b8
parentcc1ef413a859433a8313fa9c15aaff41bdc837dc (diff)
downloadgcc-75edc31f9ebe7f8b933860981a124f7f0993214b.zip
gcc-75edc31f9ebe7f8b933860981a124f7f0993214b.tar.gz
gcc-75edc31f9ebe7f8b933860981a124f7f0993214b.tar.bz2
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.
-rw-r--r--gcc/testsuite/g++.dg/analyzer/pr94028.C7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/g++.dg/analyzer/pr94028.C b/gcc/testsuite/g++.dg/analyzer/pr94028.C
index c0c35d6..5c8e2c9 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" }
}