#pragma noretval
Go Up to Pragma Directives Overview Index
Syntax (See Pseudo-grammar)
#pragma noretval
Description
Use #pragma noretval
to indicate that a function does not return. As an alternative, you can use the C++11 attribute [[noreturn]]
.
- Note: Do not confuse with functions with return type
void
.void
is a return type for subroutines that do not return anything. However, the[[noreturn]]
attribute specifies that a function does not return. This means that the control flow does not go back to the calling function; for example, functions that exit the application, such as abort and exit.