HP aC++/HP C A.06.20 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 153)
“Syntax” (page 153)
“Usage Guidelines” (page 154)
“Source File Inclusion (#include, #include_next)” (page 154)
“Macro Replacement (#define, #undef)” (page 155)
Assertions (#assert, #unassert)” (page 162)
“Conditional Compilation (#if, #ifdef, .. #endif)” (page 162)
“Line Control (#line)” (page 165)
“IOSTREAM Performance Improvement Pragma” (page 166)
“Pragma Directive (#pragma)” (page 166)
“Error Directive (#error)” (page 167)
“Warning Directive” (page 167)
“Trigraph Sequences” (page 168)
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 153