#pragma NO_INLINE: Do not Inline Next Function Definition

Scope

Function

Syntax
  #pragma NO_INLINE 
  
Synonym

None

Arguments

None

Default

None

Description

This pragma prevents the Compiler from inlining the next function in the source. Use this pragma to avoid inlining a function normally inlined by the -Oi option.

Example
Listing: Using the NO_INLINE Pragma to Prevent Function Inlining
// (With option -Oi)
int i;

#pragma NO_INLINE

static void myfun(void) {

  i = 12;

}

void main(void) {

  myfun(); // call is not inlined

}
See also

#pragma INLINE: Inline Next Function Definition

-Oi: Inlining compiler option