HP aC++/HP C A.06.25 Programmer's Guide

4 Preprocessing Directives
HP aC++ has its own, internal, preprocessor which is similar to the HP C preprocessor
described in the HP C/HP-UX Reference Manual. When you issue the aCC command,
your source files are automatically preprocessed.
This Chapter discusses the following topics:
“Overview of the Preprocessor” (page 157)
“Syntax” (page 157)
“Usage Guidelines” (page 158)
“Source File Inclusion (#include, #include_next)” (page 158)
“Macro Replacement (#define, #undef)” (page 159)
Assertions (#assert, #unassert)” (page 166)
“Conditional Compilation (#if, #ifdef, .. #endif)” (page 166)
“Line Control (#line)” (page 169)
“IOSTREAM Performance Improvement Pragma” (page 170)
“Pragma Directive (#pragma) and _Pragma Operator” (page 170)
“Error Directive (#error)” (page 171)
“Warning Directive” (page 172)
“Trigraph Sequences” (page 172)
Overview of the Preprocessor
A preprocessor is a text-processing program that manipulates the text within your
source file. You enter preprocessing directives into your source file to direct the
preprocessor to perform certain actions on the source file. For example, the preprocessor
can replace tokens in the text, insert the contents of other files into the source file, or
suppress the compilation of part of the file by conditionally removing sections of the
text. It also expands preprocessor macros and conditionally strips out comments.
Syntax
The general syntax for a preprocessor directive is:
preprocessor-directive ::=
include-directive newline
macro-directive newline
conditional-directive newline
line-directive newline
pragma-directive newline
error-directive newline
trigraph-directive newline
warning-directive newline
Overview of the Preprocessor 157