Ruby  3.4.0dev (2024-11-05 revision 348a53415339076afc4a02fcd09f3ae36e9c4c61)
noreturn.h
Go to the documentation of this file.
1 #ifndef RBIMPL_ATTR_NORETURN_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RBIMPL_ATTR_NORETURN_H
26 
28 #if RBIMPL_HAS_DECLSPEC_ATTRIBUTE(noreturn)
29 # define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
30 
31 #elif RBIMPL_HAS_ATTRIBUTE(noreturn)
32 # define RBIMPL_ATTR_NORETURN() __attribute__((__noreturn__))
33 
34 #elif RBIMPL_HAS_CPP_ATTRIBUTE(noreturn)
35 # define RBIMPL_ATTR_NORETURN() [[noreturn]]
36 
37 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112)
38 # define RBIMPL_ATTR_NORETURN() _Noreturn
39 
40 #elif defined(_Noreturn)
41 # /* glibc <sys/cdefs.h> has this macro. */
42 # define RBIMPL_ATTR_NORETURN() _Noreturn
43 
44 #else
45 # define RBIMPL_ATTR_NORETURN() /* void */
46 #endif
47 
48 #endif /* RBIMPL_ATTR_NORETURN_H */
Defines RBIMPL_HAS_ATTRIBUTE.
Defines RBIMPL_HAS_CPP_ATTRIBUTE.
Defines RBIMPL_HAS_DECLSPEC_ATTRIBUTE.