Keil Logo


The preprocessor built into the CARM Compiler processes the source text of a source file before it is actually compiled into machine language and object code. Preprocessing is the first thing the compiler does. The purpose of the preprocessor is to replace or insert additional text into the source file just prior to compilation.

Most of the obvious functions of the preprocessor require activation (by including preprocessor directives) in your source code. However, there are several things the preprocessor always does:

  • Each C comment is replaced by a single space.
  • Line continuations (indicated by a backslash ('\') at the end of a line) are removed and the lines they break apart are joined for compilation.
  • Predefined macro names are replaced with their predefined text.

In addition to these operations, the preprocessor in the CARM Compiler supports the more obvious preprocessor operations:

If you encounter preprocessor problems, you may direct the compiler to generate a Preprocessor File that shows the exact output from the preprocessor.

  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.