#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. The pragma is used to avoid inlining a function which would be inlined because of the -Oi compiler option.

Listing: Use of #pragma NO_INLINE to prevent inlining a function.


// (With the -Oi option) int i; 
#pragma NO_INLINE 
static void foo(void) { 
  i = 12; 
} 
void main(void) { 
  foo(); // call is not inlined 
} 
See also

#pragma INLINE: Inline Next Function Definition

-Oi: Inlining