CONTENTS Title Page Copyright Page Preface 1 Building and Running DEC C++ Programs 1.1 Using the DECTPU Text Editor 1.2 Using the DEC C++ Compiler 1.2.1 Compiler Command Qualifiers 1.2.2 Compiler Error Messages 1.3 Linking a DEC C++ Program 1.3.1 Linking to the DEC C++ Class Library 1.3.1.1 Linking Against the DEC C++ Class Library Object Library 1.3.1.2 Linking Against the DEC C++ Class Library Shareable Image 1.3.2 Linker Command Qualifiers 1.3.3 Linker Error Messages 1.4 Running a DEC C++ Program 1.4.1 Run-Time Errors 1.4.2 Passing Arguments to the main Function 1.5 Features Specific to OpenVMS Alpha Systems 1.5.1 OpenVMS Calling Standard Conventions 1.5.2 D-Float Support 1.5.3 Built-In Functions 2 DEC C++ Implementation 2.1 Compatibility with Other C++ Compilers 2.1.1 Enumerators in an Enumeration Declaration (cfront and ms) 2.1.2 Incomplete Declarations (cfront and ms) 2.1.3 Inline Function Definition and Prior External Declaration (cfront and ms) 2.1.4 Overloading Resolution and Enumeration Value of Zero (cfront) 2.1.5 Prefix and Postfix Increment and Decrement Operators (cfront) 2.1.6 Explicit Cast to Reference and Conversions (cfront) 2.1.7 Access Rights to Enclosing Class (cfront) 2.1.8 Static Incomplete Array Data Members (ms) 2.1.9 Address of Unqualified Member Functions (ms) 2.1.10 Ignored Visual C++ Keywords (ms) 2.1.11 Duplication of Type Qualifiers (ms) 2.2 Implementation-Specific Attributes 2.2.1 #pragma Preprocessor Directive 2.2.1.1 #pragma define_template Directive 2.2.1.2 #pragma environment Directive 2.2.1.3 #pragma extern_model Directive 2.2.1.4 #pragma extern_prefix Directive 2.2.1.5 #pragma function Directive ( Alpha only ) 2.2.1.6 #pragma intrinsic Directive ( Alpha only ) 2.2.1.7 #pragma [no]member_alignment Directive 2.2.1.8 #pragma message Directive 2.2.1.9 #pragma module Directive 2.2.1.10 #pragma pack Directive 2.2.2 Predefined Names (§r.16.10) 2.2.3 Translation Limits 2.2.4 Numerical Limits 2.2.5 Argument-Passing and Return Mechanisms 2.3 Implementation Extensions and Features 2.3.1 Identifiers (§r.2.3) 2.3.1.1 External Name Encoding 2.3.1.2 Modifying Long Names 2.3.2 Order of Static Object Initialization (§r.3.4) 2.3.3 Integral Conversions (§r.4.2) 2.3.4 Floating-Point Conversions (§r.4.3 and §r.4.4) 2.3.5 The sizeof Operator (§r.5.3.2) 2.3.6 Explicit Type Conversion (§r.5.4) 2.3.7 Multiplicative Operators (§r.5.6) 2.3.8 Additive Operators (§r.5.7) 2.3.9 Shift Operators (§r.5.8) 2.3.10 Equality Operators (§r.5.10) 2.3.11 Type Specifiers (§r.7.1.6) 2.3.12 asm Declarations (§r.7.3) 2.3.13 Linkage Specifications (§r.7.4) 2.3.14 Class Layout (§r.9.2) 2.3.14.1 Structure Alignment 2.3.14.2 Bit-Fields 2.3.14.3 Access Specifiers 2.3.14.4 Class Subobject Offsets 2.3.15 Virtual Function and Base Class Tables 2.3.16 Multiple Base Classes (§r.10.1) 2.3.17 Temporary Objects (§r.12.2) 2.3.17.1 Lifetime of Temporary Objects 2.3.17.2 Nonconstant Reference Initialization with a Temporary Object 2.3.17.3 Static Member Functions Selected by Expressions Creating Temporary Objects 2.3.18 Exception Handling (§r.15) 2.3.19 File Inclusion (§r.16.4) 2.3.19.1 Using Quotation Marks 2.3.19.2 Using Angle Brackets 2.3.19.3 Including Text Modules 3 DEC C++ in the Common Language Environment 3.1 Using Existing C Header Files 3.1.1 Providing C and C++ Linkage 3.1.2 Resolving C++ Keyword Conflicts 3.1.3 Handling Scoping Issues 3.1.4 Support for <stdarg.h> and <varargs.h> Header Files 3.2 Linkage to Non-C++ Code and Data 3.3 Creating OpenVMS Shareable Images with C++ 4 Porting to DEC C++ 4.1 Using Classes 4.1.1 Friend Declarations 4.1.2 Member Access 4.1.3 Base Class Initializers 4.1.4 Undefined Global Symbols for Static Data Members 4.2 Using Pointers 4.2.1 Pointer Conversions 4.2.2 Bound Pointers 4.2.3 Constants in Function Returns 4.2.4 Pointers to Constants 4.3 Using typedefs 4.4 Initializing References 4.5 Using the switch and goto Statements 4.6 Using Volatile Objects 4.7 Preprocessing 4.8 Managing Memory 4.9 Size-of-Array Argument to delete Operator 4.10 Flushing the Output Buffer 4.11 Missing Parenthesis Error Message 5 Using Templates 5.1 Internal Linkage 5.2 Template Instantiation Mechanisms 5.3 Rules for Defining Templates 5.4 Portability 6 Using the OpenVMS Debugger 6.1 Debugging DEC C++ Programs 6.1.1 Compiling and Linking in Preparation for Debugging 6.1.2 Debugger Support 6.1.3 Starting and Ending a Debugging Session 6.1.4 Features Basic to Debugging DEC C++ Programs 6.1.4.1 Determining Language Mode 6.1.4.2 The %name Lexical Function 6.1.4.3 Built-In Operators 6.1.4.4 Constructs in Language and Address Expressions 6.1.4.5 Data Types 6.1.4.6 Qualified Class Names 6.2 Using the OpenVMS Debugger with C++ Data 6.2.1 Nonstatic Data Members 6.2.1.1 Noninherited Data Members 6.2.1.2 Inherited Data Members 6.2.1.3 Inherited Virtual Data Members 6.2.2 Static Data Members 6.2.3 Reference Objects and Reference Members 6.2.4 Pointers to Members 6.2.5 Referencing Entities by Type 6.3 Using the OpenVMS Debugger with C++ Functions 6.3.1 Referring to Overloaded Functions 6.3.2 Referring to Static and Nonstatic Member Functions 6.3.3 Referring to Constructors 6.3.4 Referring to Destructors 6.3.5 Referring to Conversions 6.3.6 Referring to User-Defined Operators 6.3.7 Referring to Function Arguments 6.3.8 Calling C++ Methods from the Debugger A Programming Tools A.1 DEC Language-Sensitive Editor A.1.1 Starting and Terminating an LSE Session A.1.2 LSE Placeholders and Tokens A.1.3 Compiling and Reviewing Source Code from an LSE Session A.1.4 DEC Source Code Analyzer (SCA) B Built-In Functions B.1 Privileged Architecture Library Code Instructions B.1.1 _ _PAL_BPT B.1.2 _ _PAL_BUGCHK B.1.3 _ _PAL_CFLUSH B.1.4 _ _PAL_CHME B.1.5 _ _PAL_CHMK B.1.6 _ _PAL_CHMS B.1.7 _ _PAL_CHMU B.1.8 _ _PAL_DRAINA B.1.9 _ _PAL_GENTRAP B.1.10 _ _PAL_HALT B.1.11 _ _PAL_INSQHIL B.1.12 _ _PAL_INSQHILR B.1.13 _ _PAL_INSQHIQ B.1.14 _ _PAL_INSQHIQR B.1.15 _ _PAL_INSQTIL B.1.16 _ _PAL_INSQTILR B.1.17 _ _PAL_INSQTIQ B.1.18 _ _PAL_INSQTIQR B.1.19 _ _PAL_INSQUEL B.1.20 _ _PAL_INSQUEL_D B.1.21 _ _PAL_INSQUEQ B.1.22 _ _PAL_INSQUEQ_D B.1.23 _ _PAL_LDQP B.1.24 _ _PAL_MFPR_XXXX B.1.25 _ _PAL_MTPR_XXXX B.1.26 _ _PAL_PROBER B.1.27 _ _PAL_PROBEW B.1.28 _ _PAL_RD_PS B.1.29 _ _PAL_REMQHIL B.1.30 _ _PAL_REMQHILR B.1.31 _ _PAL_REMQHIQ B.1.32 _ _PAL_REMQHIQR B.1.33 _ _PAL_REMQTIL B.1.34 _ _PAL_REMQTILR B.1.35 _ _PAL_REMQTIQ B.1.36 _ _PAL_REMQTIQR B.1.37 _ _PAL_REMQUEL B.1.38 _ _PAL_REMQUEL_D B.1.39 _ _PAL_REMQUEQ B.1.40 _ _PAL_REMQUEQ_D B.1.41 _ _PAL_STQP B.1.42 _ _PAL_SWASTEN B.1.43 _ _PAL_SWPCTX B.1.44 _ _PAL_WR_PS_SW B.2 Absolute Value ( _ _ABS) B.3 Add Aligned Word Interlocked ( _ _ADAWI) B.4 Add Atomic Longword ( _ _ADD_ATOMIC_LONG) B.5 Add Atomic Quadword ( _ _ADD_ATOMIC_QUAD) B.6 AND Atomic Longword ( _ _AND_ATOMIC_LONG) B.7 AND Atomic Quadword ( _ _AND_ATOMIC_QUAD) B.8 OR Atomic Longword ( _ _OR_ATOMIC_LONG) B.9 OR Atomic Quadword ( _ _OR_ATOMIC_QUAD) B.10 Allocate Bytes from Stack ( _ _ALLOCA) B.11 Single-Precision, Floating-Point Arithmetic Built-in Functions B.12 Double-Precision, Floating-Point Arithmetic Built-in Functions B.13 Copy Sign Built-in Functions B.14 Compare Store Longword ( _ _CMP_STORE_LONG) B.15 Compare Store Quadword ( _ _CMP_STORE_QUAD) B.16 Cosine ( _ _COS) B.17 Convert G_Floating to F_Floating Chopped ( _ _CVTGF_C) B.18 Convert G-Floating to Quadword ( _ _CVTGQ) B.19 Convert IEEE T_Floating to IEEE S_Floating Chopped ( _ _CVTTS_C) B.20 Convert IEEE T-Floating to Quadword ( _ _CVTTQ) B.21 Floating-Point Absolute Value ( _ _FABS) B.22 Longword Absolute Value ( _ _LABS) B.23 Memory Barrier ( _ _MB) B.24 Memory Copy and Set Functions ( _ _MEMCPY, _ _MEMMOVE, _ _MEMSET) B.25 Read Process Cycle Counter ( _ _RPCC) B.26 Sine ( _ _SIN) B.27 Test for Bit Clear then Clear Bit Interlocked ( _ _TESTBITCCI) B.28 Test for Bit Set then Set Bit Interlocked ( _ _TESTBITSSI) B.29 Trap Barrier Instruction ( _ _TRAPB) B.30 Unsigned Quadword Multiply High ( _ _UMULH) C DEC C++ Compiler Messages