| function declaration | ||||
| function definition | ||||
| variadic arguments | ||||
(C99) | ||||
_Noreturn (C11) |
Specifies that the function does not return to its point of invocation.
Contents |
| _Noreturnfunction_declaration | (since C11)(deprecated in C23) | ||||||||
The_Noreturn keyword appears in a function declaration and specifies that the function does not return by executing the return statement or by reaching the end of the function body (it may return by executinglongjmp). If the function declared_Noreturn returns, the behavior is undefined. A compiler diagnostic is recommended if this can be detected.
The_Noreturn specifier may appear more than once in the same function declaration, the behavior is the same as if it appeared once.
This specifier is typically used through the convenience macronoreturn, which is provided in the header<stdnoreturn.h>.
The macro | (since C23) |
The following functions arenoreturn in the standard library:
Output:
Preparing to exit...
| indicates that the function does not return (attribute specifier)[edit] | |
C++ documentation for [[noreturn]] | |