#pragma NO_EXIT: No Exit Code

Scope

Function

Syntax
  #pragma NO_EXIT 
  
Synonym

None

Arguments

None

Default

None

Description

This pragma suppresses generation of the exit code and is useful for inline assembler functions.

The code generated in a function with #pragma NO_EXIT instructs the compiler to rely on the user's stack handling code. It is assumed that the user ensures safe stack use.

Note: Not all backends support this pragma. Some still generate exit code even when this pragma is specified.
Example

The following listing uses the NO_EXIT pragma (along with others) to avoid any Compiler code generation. All code is written in inline assembler.

Listing: Blocking Compiler-Generated Function Management Instructions
#pragma NO_ENTRY
#pragma NO_EXIT

#pragma NO_FRAME

#pragma NO_RETURN

void Func0(void) {

  __asm {/* no code should be written by the compiler.*/

    ...

  }

}
See also

#pragma NO_ENTRY: No Entry Code

#pragma NO_FRAME: No Frame Code

#pragma NO_RETURN: No Return Instruction