f78 Overview of the C Preprocessor Contents|Index|Next
 

Overview of the C preprocessor 

The C preprocessor is a macro processor that is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, which are brief abbreviations for longer constructs.

The C preprocessor provides the following four separate facilities that you can use as you see fit.

C preprocessors vary in some details. This manual discusses the GNU C preprocessor, the C Compatible Compiler Preprocessor. The GNU C preprocessor provides a superset of the features of ANSI Standard C.

ANSI Standard C requires the rejection of many harmless constructs commonly used by today’s C programs. Such incompatibility would be inconvenient for users, so the GNU C preprocessor is configured to accept these constructs by default.

To get ANSI Standard C, you must use the options -trigraphs, -undef and -pedantic, but in practice the consequences of having strict ANSI Standard C make it undesirable to do this. See Invoking the C preprocessor. 0