mirror of
https://github.com/fluencelabs/musl
synced 2025-06-12 06:21:39 +00:00
add _Noreturn function attribute, with fallback for pre-C11 GNUC
This commit is contained in:
@ -5,6 +5,13 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
#elif defined(__GNUC__)
|
||||
#define _Noreturn __attribute__((__noreturn__))
|
||||
#else
|
||||
#define _Noreturn
|
||||
#endif
|
||||
|
||||
#include <bits/setjmp.h>
|
||||
|
||||
|
||||
@ -29,7 +36,7 @@ void _longjmp (jmp_buf, int);
|
||||
|
||||
|
||||
int setjmp (jmp_buf);
|
||||
void longjmp (jmp_buf, int);
|
||||
_Noreturn void longjmp (jmp_buf, int);
|
||||
|
||||
#define setjmp setjmp
|
||||
#define longjmp longjmp
|
||||
|
Reference in New Issue
Block a user