Keil Logo

GENERAL: INLINE FUNCTIONS IN C


Information in this article applies to:

  • C166 all Versions
  • C251 all Versions
  • C51 all Versions
  • ARMCC all Versions

QUESTION

Does the Keil C Compiler support inline C functions?

ANSWER

This depends on the toolset. Function inlining with the '__inline' keyword was standardized with C99 and C++.

  • C51 and C251: These compilers do not support the __inline keyword.
  • C166: Function inlining was added to the C166 compiler with version 4.25 in February 2003. Please see the chapter Inline Functions in the C166 manual for more details.
  • ARMCC: Function inlining is supported in every version. Please see the chapter Inline functions in the ARMCC user manual for more details.

With all tools, you may of course use the #define preprocessor directive to create a (multiline-) macro that expands inline.

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, February 9, 2016


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.