#pragma INLINE: Inline Next Function Definition

Scope

Function Definition

Syntax
  #pragma INLINE 
  
Synonym

None

Arguments

None

Default

None

Description

This pragma directs the Compiler to inline the next function in the source.

The pragma produces the same results as using the -Oi compiler option.

Example

The following code demonstrates using an INLINE pragma to inline a function.

  int i;

  
  #pragma INLINE

  
  static void myfun(void) {

  
    i = 12;

  
  }

  
  void main(void) {

  
    myfun(); // results in inlining `i = 12;'

  
  }

  
See also

#pragma NO_INLINE: Do not Inline Next Function Definition

-Oi: Inlining compiler option