| Traditional Mode

Previous | The GNU C Preprocessor | Next

Traditional (pre-standard) C preprocessing is rather different from the preprocessing specified by the standard. When GCC is given the '-traditional-cpp' option, it attempts to emulate a traditional preprocessor.
GCC versions 3.2 and later only support traditional mode semantics in the preprocessor, and not in the compiler front ends. This chapter outlines the traditional preprocessor semantics implemented by GNU. Note, however, that you cannot use traditional mode preprocessing if you include header files from the TIGCC Library; this section is included only for reference, for people who want their programs to be compilable with traditional compilers.
The implementation does not correspond precisely to the behavior of earlier versions of GCC, nor to any true traditional preprocessor. After all, inconsistencies among traditional implementations were a major motivation for C standardization. However, we intend that it should be compatible with true traditional preprocessors in all ways that actually matter.

- Traditional lexical analysis
- Traditional macros
- Traditional miscellany
- Traditional warnings