Controlling the Preprocessor
2-26
2.5.4 Generating a Preprocessed Listing File (
−
pl Option)
The
−
pl option allows you to generate a preprocessed version of your source
file with a .pp extension. The compiler’s preprocessing functions perform the
following on the source file:
-
Each source line ending in backslash (\) is joined with the following line.
-
Trigraph sequences are expanded (if enabled with the
−
p? option).
-
Comments are removed.
-
#include files are copied into the file.
-
Macro definitions are processed.
-
Macros are expanded.
-
All other preprocessing directives, including #line directives and condi-
tional compilation, are expanded.
These operations correspond to translation phases 1
−
3 specified in section
A12 of K&R.
The preprocessed output file contains no preprocessor directives other than
#line. The compiler inserts #line directives to synchronize line and file informa-
tion in the output files with input position from the original source files. You can
use the
−
pn option to suppress #line directives. See section 2.5.4.2,
Remov-
ing the #line Directives From the Preprocessed Listing File (
−
pn Option)
on
page 2-26 for more information.
2.5.4.1 Generating a Preprocessed Listing File Without Code Generation (
−
po Option)
The
−
po option performs
only
the preprocessing functions and writes out the
preprocessed listing file. The
−
po option is used instead of the
−
pl option. No
syntax checking or code generation occurs. The
−
po option is useful when
debugging macro definitions. The resulting listing file is a valid C source file
that you can rerun through the compiler.
2.5.4.2 Removing the #line Directives From the Preprocessed Listing File (
−
pn Option)
The
−
pn option suppresses line and file information in the preprocessed listing
file. The
−
pn option suppresses the #line directives in the .pp file generated
with the
−
po or
−
pl option:
Here is an example of a #line directive:
#line 123 file.c
The
−
pn option is useful when compiling machine generated source.
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...