2.5. cpp, the GNU Preprocessor

cpp is a C-compatible macro preprocessor that works with the GNU compiler to direct the parsing of C preprocessor directives. Preprocessing directives are the lines in your program that start with a # directive name (a # sign followed by an identifier). For instance, cpp merges #include files, expands macro definitions, and processes #ifdef sections. Another example is #define, a directive that defines a macro (#define must be followed by a macro name and the macro's intended expansion).

To refer to the output of cpp, invoke gcc with the -E option; the preprocessed file will print on stdout

The C preprocessor provides the following separate facilities:

There are two convenient options to assemble files that require C-style preprocessing. Both options depend on using the compiler driver program, gcc, instead of directly calling the assembler.

For more information on cpp, refer to Using cpp, the C Preprocessor.