A platform combines multiple tutorials, projects, documentations, questions and answers for developers
  • Home (current)
  • Documentations
  • About
  • Login
  1. Home
  2. Documentations
  3. GCC 4 CPP
  4. Conditional Syntax

4.2 Conditional Syntax

A conditional in the C preprocessor begins with a conditional directive: ‘#if’, ‘#ifdef’ or ‘#ifndef’.

  • Ifdef
  • If
  • Defined
  • Else
  • Elif

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/cpp/Conditional-Syntax.html

1. Overview
Character sets
Initial processing
Overview
The preprocessing language
Tokenization
2. Header Files
Alternatives to Wrapper #ifndef
3. Macros
Argument Prescan
C++ Named Operators
Common Predefined Macros
Concatenation
Directives Within Macro Arguments
Duplication of Side Effects
Function-like Macros
Macro Arguments
Macro Pitfalls
Macros
Misnesting
Newlines in Arguments
Object-like Macros
Operator Precedence Problems
Predefined Macros
Self-Referential Macros
Standard Predefined Macros
Stringification
Swallowing the Semicolon
System-specific Predefined Macros
Undefining and Redefining Macros
Variadic Macros
Computed Includes
4. Conditionals
Conditional Syntax
Conditional Uses
Conditionals
Defined
Deleted Code
Elif
Else
Header Files
If
Ifdef
Include Operation
Include Syntax
Once-Only Headers
Search Path
System Headers
Wrapper Headers
5. Diagnostics
Diagnostics
11. Implementation Details
Differences from previous versions
Implementation Details
Implementation limits
Implementation-defined behavior
Obsolete Features
13. Environment Variables
Environment Variables
12. Invocation
Invocation
6. Line Control
Line Control
8. Other Directives
Other Directives
7. Pragmas
Pragmas
9. Preprocessor Output
Preprocessor Output
10. Traditional Mode
Traditional Mode
Traditional lexical analysis
Traditional macros
Traditional miscellany
Traditional warnings
Copyright ©2025 TypeError Powered By AnyPost, page cost 115ms.
Privacy Policy