Function
#pragma NO_EXIT
None
None
None
This pragma suppresses generation of the exit code and is useful for inline assembler functions. The two pragmas NO_ENTRY and NO_EXIT together avoid generation of any exit/entry code. Functions written in High-Level Inline (HLI) assembler can therefore be used as custom entry and exit code.
The compiler can often deduce if a function does not return, but sometimes this is not possible. This pragma can then be used to avoid the generation of exit code.
The code generated in a function with #pragma NO_EXIT may not be safe. It is assumed that the user ensures correct memory usage.
The following listing shows how to use the NO_EXIT pragma (along with others) to avoid any generated code by the compiler. All code is written in inline assembler.
#pragma NO_ENTRY #pragma NO_EXIT #pragma NO_FRAME #pragma NO_RETURN void Func0(void) { __asm {/* No code should be written by the compiler.*/ ... } }
#pragma NO_ENTRY: No Entry Code