[gcc/devel/c++-coroutines] Use <cstdlib> in the testsuite coro.h.

Iain D Sandoe iains@gcc.gnu.org
Thu Jan 16 20:31:00 GMT 2020


https://gcc.gnu.org/g:b46b8c74baab1c0000a2ceac35722d2819de27ec

commit b46b8c74baab1c0000a2ceac35722d2819de27ec
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Thu Jan 16 20:24:37 2020 +0000

    Use <cstdlib> in the testsuite coro.h.
    
    It turns out that there are different attribute decorations on some
    platforms so that a local declaration of abort () is not reliable.
    
    2020-01-16  Iain Sandoe  <iain@sandoe.co.uk>
    
    gcc/testsuite/
    * g++.dg/coroutines/coro.h: Use <cstdlib> instead of a local
    declaration for abort ().

Diff:
---
 ChangeLog.coroutines                   | 6 ++++++
 gcc/testsuite/g++.dg/coroutines/coro.h | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog.coroutines b/ChangeLog.coroutines
index 665406d..2fba1fa 100644
--- a/ChangeLog.coroutines
+++ b/ChangeLog.coroutines
@@ -1,3 +1,9 @@
+2020-01-16  Iain Sandoe  <iain@sandoe.co.uk>
+
+	gcc/testsuite/
+	* g++.dg/coroutines/coro.h: Use <cstdlib> instead of a local
+	declaration for abort ().
+
 2020-01-14  Iain Sandoe  <iain@sandoe.co.uk>
 
 	gcc/cp/
diff --git a/gcc/testsuite/g++.dg/coroutines/coro.h b/gcc/testsuite/g++.dg/coroutines/coro.h
index ca12d26..3133654 100644
--- a/gcc/testsuite/g++.dg/coroutines/coro.h
+++ b/gcc/testsuite/g++.dg/coroutines/coro.h
@@ -140,7 +140,8 @@ namespace coro = std;
 /* just to avoid cluttering dump files. */
 extern "C" int puts (const char *);
 extern "C" int printf (const char *, ...);
-extern "C" void abort (void) __attribute__((__noreturn__));
+
+#include <cstdlib> /* for abort () */
 
 #ifndef OUTPUT
 #  define PRINT(X)



More information about the Gcc-cvs mailing list