Keil™, An ARM® Company

Cx51 User's Guide

Preprocessor (I) File

The preprocessor output file is created when the PREPRINT directive is specified. This file includes the preprocessor output for the specified source file.

The most obvious use for a preprocessor output file is to verify the operation of macros and conditional preprocessor directives.

For example, for the following C source file:

#define defIt(x)  char x[] = #x

void main (void)
{
defIt(asdf);
}

The C compiler generates the following preprocessor output file:

#line 1 "main.c" /0

 void main (void)
 {
  char asdf[] = "asdf";
 }

Note

  • The preprocessor output file is a valid C source file which may be compiled by the C Compiler.