Informs the compiler that a named function never returns to the instruction following a call to that function.
By informing the compiler that it can ignore any code after the function, the directive allows for additional opportunities for optimization.
This pragma is commonly used for custom error-handling functions, in which programs can be terminated if a certain error is encountered.
Not applicable.
#pragma leaves(handle_error_and_quit)
void test_value(int value)
{
if (value == ERROR_VALUE)
{
handle_error_and_quit(value);
TryAgain(); // optimizer ignores this because
// never returns to execute it
}
}