The C preprocessor, generally called cpp
,
transforms your code before passes it to the C compiler.
The C preprocessor | ||
---|---|---|
Removes most comments, but adds a few giving the name of files and line numbers within files. The C compiler uses these when generating error messages. | Before | After |
Allows the splitting of long lines. | Before | After |
Substitutes for trigraphs if you ask. | Before | After |
Allows the definition of manifest constants. | Before | After |
Allows the use of macros. | Before | After |
Allows the use of useful macros, if you add in enough parentheses. | Before | After |
Stringizes. | Before | After |
Glues. | Before | After |
Reads your include files. | Before | After |
Reads the standard include files. | Before | After |
"Branches" according to what is defined. | Before | After |
Has a common technique for avoiding multiple inclusion of include files. | Before | After |
Allows complicated tests on integers for branches. | Before | After |
Has some preloaded macros specified by ANSI C standard. | Before | After |
Can stop compilation when something is wrong. | Before |