Example

149

typename Keyword

149

Usage

149

Example

149

Overloading new[] and delete[] for Arrays

150

Example

151

Standard Exception Classes

152

Example

152

Exceptions Thrown by the Standard C++ Library

153

type_info Class

153

Unsupported Functionality

154

7 Optimizing HP aC++ Programs

156

Requesting Optimization

156

Setting Basic Optimization Levels

156

Level 1 Optimization

156

Level 2 Optimization

156

Level 3 Optimization

157

Level 4 Optimization

157

Additional Options for Finer Control

157

Enabling Aggressive Optimizations

157

Enabling Only Conservative Optimizations

158

Removing Compilation Time Limits When Optimizing

158

Limiting the Size of Optimized Code

158

Combining Optimization Options

158

Profile-Based Optimization

158

Instrumentation

159

Collecting Data for Profiling

159

Maintaining Profile Data Files

159

Example 1

160

Example 2

160

Performing Profile-Based Optimization

160

Pragmas That Control Optimization

160

8 Exception Handling

161

Exception Handling

161

Exception Handling in C++

161

Exception Handling as Defined by the ANSI/ISO C++ International Standard

162

Basic Exception Handling Example

162

Function Try Block Examples

162

Debugging Exception Handling

163

Performance Considerations

163

Using Threads

163

Rogue Wave Standard C++ Library 2.2.1

163

Rogue Wave Standard C++ Library 1.2.1 and Tools.h++ 7.0.6

163

Using Locks

163

Required Command-line Options

164

Rogue Wave Standard C++ Library 2.2.1

164

Rogue Wave Standard C++ Library 1.2.1 and Tools.h++ 7.0.6

164

Limitations

165

Using -D_THREAD_SAFE with the cfront Compatible libstream

165

Differences between Standard iostreams and cfront Compatible libstream

165

Using -D__HPACC_THREAD_SAFE_RB_TREE

165

Exception Handling

166

Pthreads (POSIX Threads)

166

Limitations

166

12 Contents

Page 12
Image 12
HP C/aC++ for PA-RISC Software manual Optimizing HP aC++ Programs 156, Exception Handling 161