Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home

HP aC++ Programmer's Guide: HP-UX Systems

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

HP Part Number: B3901-90015

Edition: Edition 2

Published: March 2004


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
Components of the Compiling System
Using the aCC Command
Compiling a Simple Program
Executing the Program
Debugging Programs
Compiler Command Syntax
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
Environment Variables
CXXOPTS Environment Variable
CCLIBDIR Environment Variable
CCROOTDIR Environment Variable
TMPDIR Environment Variable
Floating Installation
Setting up Floating Installation
2 Command-Line Options
Options to Control Code Generation
-c Command-Line Option
+DOosname Command-Line Option
+DData_model Command-Line Option
+DSmodel Command-Line Option
-S Command-Line Option
Data Alignment and Storage
Debugging Options
+d Command-Line Option
-g Command-Line Option
-g0 Command-Line Option
-g1 Command-Line Option
Differences Between -g, -g0, and -g1 Options
When to use -g, -g0, and -g1
-g, -g1 Algorithm
+[no]objdebug Command-Line Option
Error Handling
+p Command-Line Option
-w Command-Line Option
+w Command-Line Option
+wn Command-Line Option
+Wargs Command-Line Option
+We Command-Line Option
+Weargs Command-Line Option
+Wwargs Command-Line Option
Exception Handling
+noeh Command-Line Option
Extensions to the Language
-ext Command-Line Option
+e Command-Line Option
Floating Point Processing
+O[no]cxlimitedrange Command-Line Option
+O[no]fenvaccess Command-Line Option
-fpeval Command-Line Option
-[no]fpwidetypes Command-Line Option
+FP Command-Line Option
+O[no]libmerrno Command-Line Option
+prefetch_latency Command-Line Option
+O[no]preserved_fpregs Command-Line Option
+O[no]rotating_fpregs Command-Line Option
Header File Options
-I directory Command-Line Option
-I- Command-Line Option
Online Help Option
+help Command-Line Option
Inlining Options
+inline_level num Command-Line Option
Libraries
+A Command-Line Option
-b Command-Line Option
-dynamic Command-Line Option
-exec Command-Line Option
-lname Command-Line Option
-L directory Command-Line Option
-minshared Command-Line Option
+nostl Command-Line Option
Linker Options
-n Command-Line Option
-N Command-Line Option
-q Command-Line Option
-Q Command-Line Option
-r Command-Line Option
-s Command-Line Option
-usymbol Command-Line Option
+ild Command-Line Option
+ildrelink Command-Line Option
Options for Naming the Output File
-eepsym Command-Line Option
-o Command-Line Option
-.suffix Command-Line Option
Native Language Support Option
-Y Command-Line Option
Handling Null Pointers Options
-z Command-Line Option
-Z Command-Line Option
Code Optimizing Options
Basic Optimization Level Options
Additional Optimizations for Finer Control
Advanced +Ooptimization Options
Profile-Based Optimization Options
Displaying Optimization Information
Parallel Processing Options
-mt Command-Line Option
Performance Options
-fast Command-Line Option
+Ofast Command-Line Option
+Ofaster Command-Line Option
+[no]srcpos Command-Line Option
+DSmodel Command-Line Option
Porting Options
-fast Command-Line Option
+sb Command-Line Option
+ub Command-Line Option
+uc Command-Line Option
Preprocessor Options
-C Command-Line Option
-Dname Command-Line Option
-E Command-Line Option
+m[d] Command-Line Option
+M[d] Command-Line Option
-P Command-Line Option
-Uname Command-Line Option
Profiling Code Options
-G Command-Line Option
-p Command-Line Option
+profilebucketsize Command-Line Option
Standards Related Options
-Aa Command-Line Option
-AA Command-Line Option
-AC89 Command-Line Option
-AC99 Command-Line Option
-Ae Command-Line Option
-AOa and -AOe Command-Line Options
-AP Command-Line Option
+legacy_hpc Command-Line Option
+legacy_cpp Command-Line Option
-Wc,-ansi_for_scope,[on][off] Command-Line Option
-Wc,-koenig_loopup,[on][off] Command-Line Option
Subprocesses of the Compiler
-tx,name Command-Line Option
-Wx,args Command-Line Option
Symbol Binding Options
-Bdefault Command-Line Option
-Bextern Command-Line Option
-Bhidden Command-Line Option
-Bprotected Command-Line Option
-Bprotected_data Command-Line Option
-Bprotected_def Command-Line Option
-Bsymbolic Command-Line Option
Template Options
+inst_compiletime Command-Line Option
+inst_directed Command-Line Option
+inst_implicit_include Command-Line Option
+inst_include_suffixes Command-Line Option
Verbose Compile and Link Information
+dryrun Command-Line Option
+O[no]clone Command-Line Option
+O[no]info Command-Line Option
+time Command-Line Option
-v Command-Line Option
-V Command-Line Option
Concatenating Options
3 Pragma Directives
Initialization and Termination Pragmas
INIT Pragma
FINI Pragma
Copyright Notice and Identification Pragmas
COPYRIGHT Pragma
COPYRIGHT_DATE Pragma
LOCALITY Pragma
LOCALITY_ALL Pragma
VERSIONID Pragma
Data Alignment Pragmas
ALIGN Pragma
PACK Pragma
UNALIGN Pragma
Optimization Pragmas
OPTIMIZE Pragma
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
PROTECTED 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
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)
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
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
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
13 Diagnostic Messages
aCC Message Catalog
Command Errors
Command Warnings
Fatal Errors
Future Errors
Anachronisms
Warnings
Suggestion/Information
Tool Errors
Frequently Encountered Messages
Glossary
Index
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.