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

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

Advertisement

Table of Contents

1. Overview .......................................................................................................................................... 1
1.1. Character sets ..................................................................................................................... 1
1.2. Initial processing................................................................................................................ 2
1.3. Tokenization....................................................................................................................... 4
1.4. The preprocessing language............................................................................................... 6
2. Header Files..................................................................................................................................... 9
2.1. Include Syntax ................................................................................................................... 9
2.2. Include Operation............................................................................................................... 9
2.3. Search Path....................................................................................................................... 10
2.4. Once-Only Headers.......................................................................................................... 11
2.5. Computed Includes .......................................................................................................... 12
2.6. Wrapper Headers ............................................................................................................. 13
2.7. System Headers................................................................................................................ 13
3. Macros............................................................................................................................................ 15
3.1. Object-like Macros........................................................................................................... 15
3.2. Function-like Macros ....................................................................................................... 16
3.3. Macro Arguments ............................................................................................................ 17
3.4. Stringification................................................................................................................... 19
3.5. Concatenation .................................................................................................................. 20
3.6. Variadic Macros ............................................................................................................... 21
3.7. Predefined Macros ........................................................................................................... 23
3.7.1. Standard Predefined Macros ............................................................................. 23
3.7.2. Common Predefined Macros............................................................................. 25
3.7.3. System-specific Predefined Macros .................................................................. 27
3.7.4. C++ Named Operators ...................................................................................... 28
3.8. Undefining and Redefining Macros ................................................................................. 28
3.9. Directives Within Macro Arguments ............................................................................... 29
3.10. Macro Pitfalls................................................................................................................. 30
3.10.1. Misnesting....................................................................................................... 30
3.10.2. Operator Precedence Problems ....................................................................... 30
3.10.3. Swallowing the Semicolon.............................................................................. 31
3.10.4. Duplication of Side Effects ............................................................................. 32
3.10.5. Self-Referential Macros .................................................................................. 33
3.10.6. Argument Prescan ........................................................................................... 34
3.10.7. Newlines in Arguments................................................................................... 35
4. Conditionals................................................................................................................................... 37
4.1. Conditional Uses.............................................................................................................. 37
4.2. Conditional Syntax .......................................................................................................... 37
4.2.1. Ifdef................................................................................................................... 37
4.2.2. If........................................................................................................................ 38
4.2.3. Defined.............................................................................................................. 39
4.2.4. Else.................................................................................................................... 40
4.2.5. Elif..................................................................................................................... 40
4.3. Deleted Code.................................................................................................................... 41

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 4 - USING CPP and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 4

Table of Contents