Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/test-setjmp.h

raw
1 /* Various integration tests for setjmp-handling expect a precise
2 multiline output.
3
4 The outputs from -fdiagnostics-path-format=inline-events for such
5 setjmp tests are dependent on whether setjmp is a macro or a function
6 (and whether that macro is defined in a system header).
7
8 setjmp is a function on some systems and a macro on others.
9 This header provides a SETJMP macro in a (fake) system header,
10 along with precanned decls of setjmp, for consistency of output across
11 different systems. */
12
13 #pragma GCC system_header
14
15 struct __jmp_buf_tag {
16 char buf[1];
17 };
18 typedef struct __jmp_buf_tag jmp_buf[1];
19 typedef struct __jmp_buf_tag sigjmp_buf[1];
20
21 extern int setjmp(jmp_buf env);
22 extern int sigsetjmp(sigjmp_buf env, int savesigs);
23
24 extern void longjmp(jmp_buf env, int val);
25 extern void siglongjmp(sigjmp_buf env, int val);
26
27 #define SETJMP(E) setjmp(E)