summary of site-wide JavaScript functionality
United States-English
»
Contact HP
Search:
More options
Manual
Technical documentation - English
All of HP US
HP Itanium-based Systems: HP aC++/HP C Programmer's Guide
Version A.06.10
»
Technical documentation
Complete book in PDF
»
Feedback
» Table of Contents
»
Glossary
»
Index
HP Part Number: B3901-90022
Edition: Edition 6
Published: May 2006
Legal Notices
Table of Contents
About This Document
Intended Audience
What’s in This Document
Typographical Conventions
HP-UX Release Name and Release Identifier
Publishing History
Related Documents
HP Encourages Your Comments
1 Getting Started with HP aC++
Components of the Compilation System
Using the aCC Command
Compiling a Simple Program
Executing the Program
Debugging Programs
Compiler Command Syntax and Environmental Variables
Examples of the aCC Command
Files on the aCC Command Line
C++ Source File (.C file)
Preprocessed Source Files (.i Files)
Assembly Language Source Files (.s Files)
Object Files (.o Files)
Library Files (.a and .so Files)
Configuration Files (.conf Files)
Environment Variables
CXXOPTS Environment Variable
CCLIBDIR Environment Variable
CCROOTDIR Environment Variable
TMPDIR Environment Variable
Floating Installation
HP aC++
HP C
Setting up Floating Installation
2 Command-Line Options
Options to Control Code Generation
-c
+DOosname
+DDdata_model
+DSmodel
-S
Data Alignment and Storage
Debugging Options
+d
+expand_types_in_diag
-g
-g0
-g1
Differences Between -g, -g0, and -g1 Options
When to use -g, -g0, and -g1
-g, -g1 Algorithm
+[no]objdebug
Error Handling
+p
-w
+w
+wn
+Wargs
+We
+Weargs
+Wwargs
+wlint
+wsecurity=
Exception Handling
+noeh
Extensions to the Language
-ext
+e
Floating-Point Processing Options
+O[no]cxlimitedrange
+O[no]fenvaccess
-fpeval
-[no]fpwidetypes
+FP
+FPmode
+O[no]libmerrno
+Oprefetch_latency
+O[no]preserved_fpregs
+O[no]rotating_fpregs
+O[no]sumreduction
Header File Options
-H
+hdr_create
+hdr_use
-I directory
-I-
Online Help Option
+help
Inlining Options
+inline_level num
Library Options
-b
-dynamic
-exec
-lname
-L directory
-minshared
+nostl
+Onolibcalls=
Linker Options
-e epsym
-n
-N
-q
-Q
-r
-s
-usymbol
+ild
+ildrelink
Options for Naming the Output File
-o
-.suffix
Native Language Support Option
-Y
Handling Null Pointers Options
-z
-Z
Code Optimizing Options
Basic Optimization Level Options
Additional Optimization Options for Finer Control
Advanced +Ooptimization Options
Profile-Based Optimization Options
Displaying Optimization Information
Parallel Processing Options
-mt
Performance Options
-fast
+Ofast
+Ofaster
+[no]srcpos
+DSmodel
Porting Options
-fast
+sb
+ub
+uc
+w64bit
+wendian
Preprocessor Options
-C
-Dname
-E
+m[d] and +make[d]
+M[d] and +Make[d]
-P
-Uname
Profiling Code Options
-G
-p
+profilebucketsize
Standards Related Options
-Aa
-AA
-Aarm
-AC89
-AC99
-Ae
-Ag++
-Agcc
-AOa and -AOe
-AP
+legacy_cpp
+legacy_v5
+tru64
-Wc,-ansi_for_scope,[on|off]
-Wc,-koenig_loopup,[on|off]
Subprocesses of the Compiler
-tx,name
-Wx,args
Symbol Binding Options
-Bdefault
-Bextern
-Bhidden
-Bprotected
-Bprotected_data
-Bprotected_def
-Bsymbolic
Template Options
+[no]dep_name
+inst_compiletime
+inst_directed
+inst_implicit_include
+inst_include_suffixes
Verbose Compile and Link Information
+dryrun
+O[no]clone
+O[no]info
+time
-v
-V
Concatenating Options
3 Pragma Directives and Attributes
Initialization and Termination Pragmas
INIT
FINI
Copyright Notice and Identification Pragmas
COPYRIGHT
COPYRIGHT_DATE
LOCALITY
LOCALITY_ALL
VERSIONID
Data Alignment Pragmas
ALIGN
PACK
UNALIGN
Optimization Pragmas
OPTIMIZE
OPT_LEVEL Pragma
FLOAT_TRAPS_ON Pragma
[NO]INLINE Pragma
NO_INLINE Pragma
NO_RETURN Pragma
Other Pragmas
DEFAULT_BINDING Pragma
ESTIMATED_FREQUENCY Pragma
EXTERN Pragma
FREQUENTLY_CALLED Pragma
HIDDEN Pragma
HP_DEFINED_EXTERNAL Pragma
HP_DEFINED_INTERNAL Pragma
IF_CONVERT Pragma
POP Pragma
PROTECTED Pragma
PTRS_STRONGLY TYPED Pragma
PTRS_TO_GLOBALS Pragma
PUSH Pragma
RARELY_CALLED Pragma
STDC CX_LIMITED_RANGE Pragma
STDC FP_CONTRACT Pragma
STDC FENV_ACCESS Pragma
UNROLL_FACTOR Pragma
OMP ATOMIC Pragma
OMP BARRIER Pragma
OMP CRITICAL Pragma
OMP FOR Pragma
OMP FLUSH Pragma
OMP MASTER Pragma
OMP ORDERED Pragma
OMP PARALLEL Pragma
OMP PARALLEL FOR Pragma
OMP PARALLEL SECTIONS Pragma
OMP SECTIONS Pragma
OMP SINGLE Pragma
OMP THREADPRIVATE Pragma
OpenMP Clauses
private
firstprivate
lastprivate
copyprivate
if
default
shared
copyin
reduction
nowait
ordered
schedule
num_threads
Attributes
attribute malloc
attribute non_exposing
attribute noreturn
attribute format
4 Preprocessing Directives
Overview of the Preprocessor
Syntax
Usage Guidelines
Source File Inclusion (#include)
Macro Replacement (#define, #undef)
Assertions (#assert, #unassert)
Conditional Compilation (#if, #ifdef, .. #endif)
Line Control (#line)
IOSTREAM Performance Improvement Pragma
Pragma Directive (#pragma)
Error Directive (#error)
Warning Directive
Trigraph Sequences
Examples
5 Using HP aC++ Templates
Invoking Compile-Time Instantiation
Scope and Precedence
Template Processing
Explicit Instantiation
Command-Line Option Instantiation
Compile-Time Instantiation
Migrating from Automatic Instantiation to Compile-time Instantiation
C++ Template Tutorial
6 Standardizing Your Code
HP aC++ Keywords
bool Keyword
dynamic_cast Keyword
explicit Keyword
mutable Keyword
namespace and using Keywords
typeid Keyword
volatile Keyword
wchar_t Keyword
template Keyword
typename Keyword
Overloading new[] and delete[] for Arrays
Example
Standard Exception Classes
Example
Exceptions Thrown by the Standard C++ Library
type_info Class
Unsupported Functionality
7 Optimizing HP aC++ Programs
Requesting Optimization
Setting Basic Optimization Levels
Additional Options for Finer Control
Profile-Based Optimization
Pragmas That Control Optimization
8 Exception Handling
Exception Handling
Exception Handling in C++
Exception Handling as Defined by the ANSI/ISO C++ International Standard
Basic Exception Handling Example
Function Try Block Examples
Debugging Exception Handling
Performance Considerations
Using Threads
Rogue Wave Standard C++ Library 2.2.1
Rogue Wave Standard C++ Library 1.2.1 and Tools.h++ 7.0.6
Using Locks
Required Command-line Options
Limitations
Exception Handling
Pthreads (POSIX Threads)
Limitations
Parallel Programming Using OpenMP
OpenMP Implementation
Environment Variables in OpenMP
Runtime Library Functions in OpenMP
Execution Environment Functions
Lock Functions
Timing Functions
9 Tools and Libraries
HP Specific Features of lex and yacc
Creating and Using Libraries
HP aC++ Libraries
Creating and Using Shared Libraries
Advanced Shared Library Features
Standard HP-UX Libraries and Header Files
HP aC++ File Locations
HP aC++ Executable Files
HP aC++ Runtime Libraries and Header Files
10 Mixing C++ with Other Languages
Calling Other Languages
Data Compatibility between C and C++
HP aC++ Calling HP C
HP C Calling HP aC++
Calling HP FORTRAN 90 from HP aC++
11 Distributing Your C++ Products
Applications that use HP aC++ Shared Libraries
Linking Your HP aC++ Libraries with Other Languages
Installing your Application
HP aC++ Files You May Distribute
Terms for Distribution of HP aC++ Files
12 Migrating from HP C++ (cfront) to HP aC++
General Guidelines for Migration
Getting Started with Migration
Writing Code for both Compilers
Explicit Loading and Unloading of Shared Libraries
Memory Allocation
Command-Line Differences
New Command-Line Options
Obsolete Command-Line Options
Changed Command-Line Options
Migration Considerations when Debugging
Migration Considerations when Using Exception Handling
Exception Handling is the Default
Memory Allocation Failure and operator new
Possible Differences when Exiting a Signal Handler
Differences in setjmp/longjmp Behavior
Calling unexpected
Unreachable catch Clauses
Throwing an Object having an Ambiguous Base Class
Migration Considerations when Using Libraries
Standards Based Libraries
HP C++ (cfront) Compatibility Libraries
Migration Considerations Related to Preprocessing
Obsolete Preprocessor Options
Migration Considerations Related to Standardization
Changes in C++ Semantics
Changes in C++ Syntax
Migration Considerations when Using Templates
Verbose Template Processing Information
Common Template Migration Syntax Changes
The cfront Implicit Include Convention
Converting Directed Mode to Explicit Instantiation
A Diagnostic Messages
aCC Message Catalog
Command Errors
Command Warnings
Fatal Errors
Future Errors
Anachronisms
Warnings
Suggestion/Information
Tool Errors
Frequently Encountered Messages
Glossary
Index
List of Tables
1
HP-UX 11i Releases
2
Title not available (Publishing History)
2-1
ILP32 Data Model and LP64 Data Model
2-2
Size and Alignment of HP Compiler Data Types
2-3
Options for +FP[flags]
2-4
Option Matrix for -mt
2-5
Examples
2-6
Examples
2-7
Identifiers
2-8
Identifiers
6-1
HP aC++ Keywords
6-2
Unsupported Functionality
12-1
New Command-Line Options
12-2
Obsolete Command-Line Options
12-3
Changed Command-Line Options
Printable version
Privacy statement
Using this site means you accept its terms
Feedback to webmaster
© Hewlett-Packard Development Company, L.P.