HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

Description
The #line preprocessing directive causes HP aC++ to treat lines following it in the
program as if the name of the source file were filename and the current line number were
digit-sequence. This serves to control the file name and line number that are given in
diagnostic messages. This feature is used primarily by preprocessor programs that
generate C++ code. It enables them to force HP aC++ to produce diagnostic messages
with respect to the source code that is input to the preprocessor rather than the C++
source code that is output.
HP aC++ defines two macros that you can use for error diagnostics. The first is __LINE__,
an integer constant equal to the value of the current line number. The second is
__FILE__, a quoted string literal equal to the name of the input source file. You can
change __FILE__ and __LINE__ using #include or #line directives.
Example
#line 5 "myfile"
IOSTREAM Performance Improvement Pragma
The -AA -D_HP_NONSTD_FAST_IOSTREAM Performance Improvement macro can be
used to improve the -AA iostream performance.
Syntax:
#define _HP_NONSTD_FAST_IOSTREAM 1 (or)
aCC options -D_HP_NONSTD_FAST_IOSTREAM
This macro enables the following non-standard features:
Sets std::ios_base::sync_with_stdio(false), which disables the default
synchronization with stdio
Sets std::cin.tie(0). which unties the cin from other streams.
Replaces all occurrences of “std::endl” with “\n.
Enabling this macro can provide noticeable performance improvement if the application
uses iostreams often.
Overview of the Preprocessor 159