Improve C99 compatibility of gcc.dg/setjmp-7.c test

Message ID 87jzqs8s4h.fsf@oldenburg.str.redhat.com
State Accepted
Headers
Series Improve C99 compatibility of gcc.dg/setjmp-7.c test |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Florian Weimer Nov. 8, 2023, 10:19 a.m. UTC
  gcc/testsuite/ChangeLog:

	* gcc.dg/setjmp-7.c (_setjmp): Declare.

---
 gcc/testsuite/gcc.dg/setjmp-7.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: 0610f88cc6b23393b43541b73e50446cb8ab9c57
  

Comments

Jakub Jelinek Nov. 8, 2023, 10:23 a.m. UTC | #1
On Wed, Nov 08, 2023 at 11:19:10AM +0100, Florian Weimer wrote:
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/setjmp-7.c (_setjmp): Declare.

Ok.

	Jakub
  

Patch

diff --git a/gcc/testsuite/gcc.dg/setjmp-7.c b/gcc/testsuite/gcc.dg/setjmp-7.c
index 44b5bcbfa9d..579542380ba 100644
--- a/gcc/testsuite/gcc.dg/setjmp-7.c
+++ b/gcc/testsuite/gcc.dg/setjmp-7.c
@@ -6,6 +6,7 @@  struct __jmp_buf_tag { };
 typedef struct __jmp_buf_tag jmp_buf[1];
 struct globals { jmp_buf listingbuf; };
 extern struct globals *const ptr_to_globals;
+int _setjmp (struct __jmp_buf_tag __env[1]);
 void foo()
 {
     if ( _setjmp ( ((*ptr_to_globals).listingbuf )))