[gcc(refs/users/ppalka/heads/libstdcxx-floating-to_chars)] analyzer: Use noexcept instead of throw() for C++11 and later (PR 96014)

Patrick Palka ppalka@gcc.gnu.org
Fri Jul 17 04:27:08 GMT 2020


https://gcc.gnu.org/g:75edc31f9ebe7f8b933860981a124f7f0993214b

commit 75edc31f9ebe7f8b933860981a124f7f0993214b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jul 16 11:44:32 2020 +0100

    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:
---
 gcc/testsuite/g++.dg/analyzer/pr94028.C | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/analyzer/pr94028.C b/gcc/testsuite/g++.dg/analyzer/pr94028.C
index c0c35d65829..5c8e2c9b286 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" }
   }


More information about the Gcc-cvs mailing list