Table of Contents
1. Overview .......................................................................................................................................... 1
1.1. Initial processing................................................................................................................ 1
1.2. Tokenization....................................................................................................................... 3
2. Header Files..................................................................................................................................... 7
2.1. Include Syntax ................................................................................................................... 7
2.2. Include Operation............................................................................................................... 7
2.3. Search Path......................................................................................................................... 8
2.4. Once-Only Headers............................................................................................................ 9
2.5. Computed Includes .......................................................................................................... 10
2.6. Wrapper Headers ............................................................................................................. 11
2.7. System Headers................................................................................................................ 11
3. Macros............................................................................................................................................ 13
3.1. Object-like Macros........................................................................................................... 13
3.2. Function-like Macros ....................................................................................................... 14
3.3. Macro Arguments ............................................................................................................ 15
3.4. Stringification................................................................................................................... 17
3.5. Concatenation .................................................................................................................. 18
3.6. Variadic Macros ............................................................................................................... 19
3.7. Predefined Macros ........................................................................................................... 21
3.9. Macro Pitfalls................................................................................................................... 26
3.9.1. Misnesting......................................................................................................... 27
3.9.6. Argument Prescan ............................................................................................. 31
4. Conditionals................................................................................................................................... 33
4.1. Conditional Uses.............................................................................................................. 33
4.2. Conditional Syntax .......................................................................................................... 33
4.2.1. Ifdef................................................................................................................... 33
4.2.2. If........................................................................................................................ 34
4.2.3. Defined.............................................................................................................. 35
4.2.4. Else.................................................................................................................... 36
4.2.5. Elif..................................................................................................................... 36
4.3. Deleted Code.................................................................................................................... 37
5. Diagnostics ..................................................................................................................................... 39
6. Line Control .................................................................................................................................. 41
7. Pragmas ......................................................................................................................................... 43
8. Other Directives ............................................................................................................................ 45
9. Preprocessor Output..................................................................................................................... 47
10. Traditional Mode ........................................................................................................................ 49
11. Implementation Details .............................................................................................................. 51
Need help?
Do you have a question about the ENTERPRISE LINUX 3 - USING CPP and is the answer not in the manual?
Questions and answers