]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/cpp/traditional-mode.rst
f44a5a5d4db7bb918ead8559e8a2d626c5c6a317
[thirdparty/gcc.git] / gcc / doc / cpp / traditional-mode.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _traditional-mode:
7
8 Traditional Mode
9 ----------------
10
11 Traditional (pre-standard) C preprocessing is rather different from
12 the preprocessing specified by the standard. When the preprocessor
13 is invoked with the
14 :option:`-traditional-cpp` option, it attempts to emulate a traditional
15 preprocessor.
16
17 This mode is not useful for compiling C code with GCC,
18 but is intended for use with non-C preprocessing applications. Thus
19 traditional mode semantics are supported only when invoking
20 the preprocessor explicitly, and not in the compiler front ends.
21
22 The implementation does not correspond precisely to the behavior of
23 early pre-standard versions of GCC, nor to any true traditional preprocessor.
24 After all, inconsistencies among traditional implementations were a
25 major motivation for C standardization. However, we intend that it
26 should be compatible with true traditional preprocessors in all ways
27 that actually matter.
28
29 .. toctree::
30 :maxdepth: 2
31
32 traditional-lexical-analysis
33 traditional-macros
34 traditional-miscellany
35 traditional-warnings