Table Of Contents - Red Hat ENTERPRISE LINUX 3 - USING CPP Using Instructions

Using cpp, the c preprocessor
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING CPP:
Table of Contents

Advertisement

Table of Contents

1. Overview .......................................................................................................................................... 1
1.1. Initial processing................................................................................................................ 1
1.2. Tokenization....................................................................................................................... 3
1.3. The preprocessing language............................................................................................... 5
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.7.1. Standard Predefined Macros ............................................................................. 21
3.7.2. Common Predefined Macros............................................................................. 22
3.7.3. System-specific Predefined Macros .................................................................. 25
3.7.4. C++ Named Operators ...................................................................................... 25
3.8. Undefining and Redefining Macros ................................................................................. 26
3.9. Macro Pitfalls................................................................................................................... 26
3.9.1. Misnesting......................................................................................................... 27
3.9.2. Operator Precedence Problems ......................................................................... 27
3.9.3. Swallowing the Semicolon................................................................................ 28
3.9.4. Duplication of Side Effects ............................................................................... 29
3.9.5. Self-Referential Macros .................................................................................... 30
3.9.6. Argument Prescan ............................................................................................. 31
3.9.7. Newlines in Arguments..................................................................................... 32
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
11.1. Implementation-defined behavior .................................................................................. 51

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents