[an error occurred while processing this directive]

HP OpenVMS Systems

C++ Programming Language
Content starts here

Compaq C++
Using Compaq C++ for OpenVMS Alpha


Previous Contents Index


Appendix A
Compiler Command Qualifiers

This chapter describes the qualifiers available to the cxx command.

Qualifiers indicate special actions to be performed by the compiler or special input file properties. Compiler qualifiers can apply to either the CXX command or to the specification of the file being compiled. When a qualifier follows the CXX command, it applies to all the files listed. When a qualifier follows the file specification, it applies only to the file immediately preceding it.

Table A-1 summarizes cxx qualifiers. Detailed descriptions follow the table.

Table A-1 CXX Command Qualifiers
Command Qualifiers Defaults
/[NO]ALTERNATIVE_TOKENS /NOALTERNATIVE_TOKENS
/[NO]ANSI_ALIAS See text.
/ARCHITECTURE=option /ARCHITECTURE=GENERIC
/ASSUME=(option[,...]) See text.
/[NO]CHECK[=[NO]UNINITIALIZED_VARIABLES] /NOCHECK
/[NO]COMMENTS=option See text.
/[NO]DEBUG[=(option[,...])] /DEBUG=(TRACEBACK,NOSYMBOLS)
/[NO]DEFINE=(identifier[=definition][,...]) /NODEFINE
/[NO]DEFINE=__FORCE_INSTANTIATIONS /NODEFINE=__FORCE_INSTANTIATIONS
/[NO]DEFINE=__[NO_]USE_STD_IOSTREAM /DEFINE=__[NO_]USE_STD_IOSTREAM
/[NO]DIAGNOSTICS[=file-spec] /NODIAGNOSTICS
/[NO]DISTINGUISH_NESTED_ENUMS /NODISTINGUISH_NESTED_ENUMS
/ENDIAN=option /ENDIAN=LITTLE
/[NO]ERROR_LIMIT[=n] /NOERROR_LIMIT
/EXTERN_MODEL=option /EXTERN_MODEL=RELAXED_REFDEF
/FLOAT=option /FLOAT=G_FLOAT
/[NO]G_FLOAT /G_FLOAT
/GRANULARITY=option /GRANULARITY=QUADWORD
/IEEE_MODE[=option] /IEEE_MODE=FAST
/[NO]IMPLICIT_INCLUDE /NOIMPLICIT_INCLUDE
/[NO]INCLUDE_DIRECTORY=(pathname[,...]) /NOINCLUDE_DIRECTORY
/INSTRUCTION_SET=[NO]FLOATING_POINT /INSTRUCTION_SET=FLOATING_POINT
/L_DOUBLE_SIZE=option /L_DOUBLE_SIZE=128
/LIBRARY See text.
/[NO]LINE_DIRECTIVES /LINE_DIRECTIVES
/[NO]LIST[=file-spec] /NOLIST (interactive mode)
  /LIST (batch mode)
/[NO]MACHINE_CODE[=option] /NOMACHINE_CODE
/[NO]MEMBER_ALIGNMENT /MEMBER_ALIGNMENT
/[NO]MMS_DEPENDENCIES=[=(option[,option)]] /NOMMS_DEPENDENCIES
/NAMES=(option[,...]) /NAMES=(UPPERCASE,TRUNCATED)
/NESTED_INCLUDE_DIRECTORY[=option] /NESTED_INCLUDE_DIRECTORY=INCLUDE_FILE
/[NO]OBJECT[=file-spec] /OBJECT
/[NO]OPTIMIZE[=(option[,...])] /OPTIMIZE
/[NO]PREFIX_LIBRARY_ENTRIES[=(option[,...])] See text.
/[NO]PREPROCESS_ONLY[=filename] /NOPREPROCESS_ONLY
/PSECT_MODEL=[NO]MULTILANGUAGE /NOMULTILANGUAGE
/[NO]QUIET See text.
/REENTRANCY=option /REENTRANCY=TOLERANT
/REPOSITORY=option See text.
/ROUNDING_MODE=option /ROUNDING_MODE=NEAREST
/RTTI /RTTI
/[NO]SHARE_GLOBALS /NOSHARE_GLOBALS
/SHOW[=(option[,...])] /SHOW=(HEADER,SOURCE
/STANDARD=(option,...) None.
/[NO]TEMPLATE_DEFINE[=(option,...)] See text.
/[NO]UNDEFINE=(identifier[,...]) /NOUNDEFINE
/[NO]UNSIGNED_CHAR /NOUNSIGNED_CHAR
/[NO]USING_STD /USING_STD
/[NO]VERSION /NOVERSION
/[NO]WARNINGS[=(option[,...])] /WARNINGS
/[NO]XREF[=file-spec] /NOXREF

/ALTERNATIVE_TOKENS
/NOALTERNATIVE_TOKENS (D)

Enables use of the following operator keywords and digraphs to generate tokens:
Operator Keyword Token
and &&
and_eq &=
bitand &
bitor |
compl ~
not !
not_eq !=
or ||
or_eq |=
xor ^
xor_eq ^=
Digraph Token
:> ]
%: #
%> }
<% {
<: [

The default is /NOALTERNATIVE_TOKENS when compiling with the /STANDARD=ARM, /STANDARD=CFRONT, /STANDARD=MS, /STANDARD=GNU, and /STANDARD=ANSI options. The default is /ALTERNATIVE_TOKENS when compiling with the /STANDARD=STRICT_ANSI option.

/ANSI_ALIAS
/ANSI_ALIAS (D)
/NOANSI_ALIAS

Directs the compiler to assume the ANSI/ISO C aliasing rules, which gives it the freedom to generate better optimized code.

/NOANSI_ALIAS specifies that any pointer can point to any object, regardless of type. /ANSI_ALIAS specifies that pointers to a type T can point to objects of the same type, ignoring type qualifiers such as const, unaligned, or volatile, or whether the object is signed or unsigned. Pointers to a type T can also point to structures, unions, or array members whose type follows the rules above.

The aliasing rules are further explained in Section 3.3, paragraphs 20 and 25, of the ANSI C89 Standard (Section 6.3 of the ISO version, same paragraphs).

/ARCHITECTURE=option
/ARCHITECTURE=GENERIC (D)

Determines the type of Alpha chip code generated for a particular program. The /architecture qualifier uses the same keyword options (keywords) as the /optimize=tune qualifier.

Where the /OPTIMIZE=TUNE qualifier is primarily used by certain higher-level optimizations for instruction scheduling purposes, the /ARCHITECTURE qualifier determines the type of code instructions generated for the program unit being compiled.

OpenVMS Version 7.1 and subsequent releases provide an operating system kernel that includes an instruction emulator. This emulator allows new instructions, not implemented on the host processor chip, to execute and produce correct results. Applications using emulated instructions will run correctly, but may incur significant software emulation overhead at runtime.

All Alpha processors implement a core set of instructions. Certain Alpha processor versions include additional instruction extensions.

Select one of the /ARCHITECTURE qualifier options shown in the following table.

Option Usage
GENERIC Generates code that is appropriate for all Alpha processor generations. This is the default.
HOST Generates code for the processor generation in use on the system being used for compilation.

Running programs compiled with this option on other implementations of the Alpha architecture may encounter instruction-emulation overhead.

EV4 Generates code for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture.

Programs compiled with the EV4 option run without instruction-emulation overhead on all Alpha processors.

EV5 Generates code for some 21164 chip implementations of the Alpha architecture that use only the base set of Alpha instructions (no extensions).

Programs compiled with the EV5 option will without instruction-emulation overhead on all Alpha processors.

EV56 Generates code for some 21164 chip implementations that use the byte and word-manipulation instruction extensions of the Alpha architecture.

Running programs compiled with the EV56 option might incur emulation overhead on EV4 and EV5 processors, but will still run correctly on OpenVMS Version 7.1 (or higher) systems.

PCA56 Generates code for the 21164PC chip implementation that uses the byte- and word-manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture.

Programs compiled with the PCA56 option might incur emulation overhead on EV4, EV5, and EV56 processors, but still run correctly on OpenVMS Version 7.1 (or higher) systems.

EV6 Generates code for the 21264 implementation of the Alpha architecture.

See also /OPTIMIZE=TUNE, which is a more typical option. Note that if /ARCHITECTURE is explicitly specified and /OPTIMIZE=TUNE is not, the tuning processor defaults to the architecture processor; that is, /ARCHITECTURE=EV6 implies /OPTIMIZE=TUNE=EV6.

/ASSUME
/ASSUME=(option[,...])

Controls compiler assumptions. You may select the following options:
Option Usage
[NO]WRITABLE_STRING_LITERALS Stores string constants in a writable psect. Otherwise, such constants are placed in a nonwriteable psect.
[NO]ACCURACY_SENSITIVE Specifies whether certain code transformations that affect floating-point operations are allowed. These changes may or may not affect the accuracy of the program's results.

If you specify NOACCURACY_SENSITIVE, the compiler is free to reorder floating-point operations based on algebraic identities (inverses, associativity, and distribution). This allows the compiler to move divide operations outside of loops, which improves performance.

The default, ACCURACY_SENSITIVE, directs the compiler to use only certain scalar rules for calculations. This setting can prevent some optimization.

[NO]ALIGNED_OBJECTS Controls an optimization for dereferencing pointers.

Dereferencing a pointer to a longword- or quadword-aligned object is more efficient than dereferencing a pointer to a byte- or word-aligned object. Therefore, the compiler can generate more optimized code if it makes the assumption that a pointer object of an aligned pointer type does point to an aligned object.

Because the compiler determines the alignment of the dereferenced object from the type of the pointer, and the program is allowed to compute a pointer that references an unaligned object (even though the pointer type indicates that it references an aligned object), the compiler must assume that the dereferenced object's alignment matches or exceeds the alignment indicated by the pointer type.

The default, /ASSUME=ALIGNED_OBJECTS, allows the compiler to make such an assumption. With this assumption made, the compiler can generate more efficient code for pointer dereferences of aligned pointer types.

To prevent the compiler from assuming the pointer type's alignment for objects to which it points, use the /ASSUME=NOALIGNED_OBJECTS qualifier.

This option causes the compiler to generate longer code sequences to perform indirect load and store operations to avoid hardware alignment faults for arbitrarily aligned addresses. Although this flag might generate less efficient code than the default /ASSUME=ALIGNED_OBJECTS option, by avoiding hardware alignment faults, it speeds the execution of programs that reference unaligned data.

[NO]GLOBAL_ARRAY_NEW Controls whether calls to global array new and delete are generated as specified by ANSI. Pre-ANSI global array new generated calls to operator new(). According to ANSI, use of global array new generates calls to operator new()[]. The GLOBAL_ARRAY_NEW option also defines the macro __GLOBAL_ARRAY_NEW.

GLOBAL_ARRAY_NEW generates calls to operator new()[] for global array new expressions such as new int[4]; this is the default when compiling /STANDARD=ANSI, /STANDARD=STRICT_ANSI,
/STANDARD=GNU, and /STANDARD=MS.

NOGLOBAL_ARRAY_NEW generates calls to operator new() for global array new expressions such as new int[4]; and preserves compatibility with Version 5.n; this is the default when compiling /STANDARD=ARM, and /STANDARD=CFRONT.

[NO]HEADER_TYPE_DEFAULT Controls whether the compiler appends a file extension to a file name. The default is /ASSUME=NOHEADER_TYPE_DEFAULT. To prevent the compiler from appending a file extension to files (such as STL header files that must not have file extensions) use the /ASSUME=NOHEADER_TYPE_DEFAULT qualifier.
[NO]MATH_ERRNO Controls whether intrinsic code is generated for math functions that set the errno variable. The default is /ASSUME=MATH_ERRNO, which does not allow intrinsic code for such math functions to be generated, even if /OPTIMIZE=INTRINSICS is in effect. Their prototypes and call formats, however, are still checked.
[NO]POINTERS_TO_GLOBALS Controls whether the compiler can safely assume that global variables have not had their addresses taken in code that is not visible to the current compilation.

The default is /ASSUME=POINTERS_TO_GLOBALS, which directs the compiler to assume that global variables have had their addresses taken in separately compiled modules and that, in general, any pointer dereference could be accessing the same memory as any global variable. This is often a significant barrier to optimization.

While the /ANSI_ALIAS option allows some resolution based on data type, /ASSUME=POINTERS_TO_GLOBALS provides significant additional resolution and improved optimization in many cases.

The /ASSUME=NOPOINTERS_TO_GLOBALS option tells the compiler that any global variable accessed through a pointer in the compilation must have had its address taken within that compilation. The compiler can see any code that takes the address of an extern variable. If it does not see the address of the variable being taken, the compiler can assume that no pointer points to the variable.

Note that /ASSUME=NOPOINTERS_TO_GLOBALS does not tell the compiler that the compilation never uses pointers to access global variables.

[NO]TRUSTED_SHORT_ALIGNMENT Allows the compiler additional assumptions about the alignment of short types that, although naturally aligned, might cross a quadword boundary.

The TRUSTED_SHORT_ALIGNMENT option indicates that the compiler should assume any datatype accessed through a pointer is naturally aligned. This generates the fastest code, but can silently generate the wrong results when an unaligned short object crosses a quadword boundary.

The NOTRUSTED_SHORT_ALIGNMENT tells the compiler that short objects might not be naturally aligned. The compiler generates slightly larger (and slower) code that gives the correct result, regardless of the actual alignment of the data. This is the default.

Note that the NOTRUSTED_SHORT_ALIGNMENT option does not override the __unaligned type qualifier, the /MISALIGN option, or the /ASSUME=NOALIGNED_OBJECTS option.

[NO]WHOLE_PROGRAM Tells the compiler that except for well-behaved library routines, the whole program consists only of the single object module being produced by this compilation. The optimizations enabled by /ASSUME=WHOLE_PROGRAM include all those enabled by /ASSUME=NOPOINTERS_TO_GLOBALS and possibly other optimizations.

The default is /ASSUME=NOWHOLE_PROGRAM.

/CHECK
/CHECK[=([NO]UNINITIALIZED_VARIABLES)]
/NOCHECK (D)

Use this qualifier as a debugging aid.

Use /check=uninitialized_variables to initialize all automatic variables to the value 0x7ff580057ff58005. This value is a floating NaN and, if used, causes a floating-point trap. If used as a pointer, this value is likely to cause an ACCVIO.

/COMMENTS
/COMMENTS[=option]
/COMMENTS=SPACE (D)
/NOCOMMENTS

Specifies whether comments appear in preprocessor output files. If comments do not appear, this qualifier specifies what replaces them. The options are:
Option Usage
AS_IS Specifies that the comment appear in the output file. This is the default if you use the /comments qualifier without specifying an option.
SPACE Specifies that a single space replaces the comment in the output file. This is the default if you do not specify the /comments qualifier at all.

Specifying /NOCOMMENTS tells the preprocessor that nothing replaces the comment in the output file. This may result in inadvertent token pasting.

The preprocessor may replace a comment at the end of a line or replace a line by itself with nothing, even if you specify /COMMENTS=SPACE . Specifying /COMMENTS=SPACE cannot change the meaning of the program.

/DEBUG
/DEBUG[=(option[,...])]
/DEBUG=(TRACEBACK,NOSYMBOLS) (D)
/NODEBUG

Requests that information be included in the object module for use with the OpenVMS Debugger. You can select the following options:
Option Usage
ALL Includes all possible debugging information. Specifyin /DEBUG=ALL is equivalent to /DEBUG=(TRACEBACK,SYMBOLS).
NONE Excludes all debugging information. This option is equivalent to specifying /NODEBUG .
NOSYMBOLS Excludes symbol table records, which are needed only for symbolic debugging. This option is the default if you do not specify the /DEBUG qualifier on the command line.
SYMBOLS Generates symbol table records.
NOTRACEBACK Excludes traceback records. This option is equivalent to specifying /NODEBUG and is used to avoid generating extraneous information from thoroughly debugged program modules.
TRACEBACK Includes only traceback records. This option is the default if you do not specify the /DEBUG qualifier on the command line.

Specifying /DEBUG with no options is equivalent to specifying /DEBUG=ALL .

/DEFINE
/DEFINE=(identifier[=definition][,...])
/NODEFINE (D)

Performs the same function as the #define preprocessor directive. That is, /DEFINE defines a token string or macro to be substituted for every occurrence of a given identifier in the program.

DCL converts all input to uppercase unless it is enclosed in quotation marks.

The simplest form of a /DEFINE definition is as follows:


 /DEFINE=true

This results in a definition like the one that would result from the following definition:


 #define TRUE 1

When more than one /DEFINE is present on the CXX command line or in a single compilation unit, only the last /DEFINE is used.

When both /DEFINE and /UNDEFINE are present on a command line, /DEFINE is evaluated before /UNDEFINE .

/DEFINE=__FORCE_INSTANTIATIONS
/NODEFINE=__FORCE_INSTANTIATIONS (D)

Forces the standard library template preinstantiations to be created in the user's repository. Normally these instantiations are suppressed because the library already contains them.

/DEFINE=__[NO_]USE_STD_IOSTREAM
/DEFINE=__NO_USE_STD_IOSTREAM (D)

Use or do not use the standard iostreams. Specifying /DEFINE=__USE_STD_IOSTREAM forces the inclusion of the ANSI standard version of the iostream header file. This is the default in STRICT_ANSI mode. Otherwise, the pre-standard AT&T-compatible version of iostreams is used.

/DIAGNOSTICS
/DIAGNOSTICS[=file-spec]
/NODIAGNOSTICS (D)

Creates a file containing compiler diagnostic messages. The default file extension for a diagnostics file is .DIA. The diagnostics file is used with the DEC Language-Sensitive Editor (LSE). To display a diagnostics file, enter the command REVIEW/FILE=file-spec while in LSE.

/DISTINGUISH_NESTED_ENUMS
/NODISTINGUISH_NESTED_ENUMS (D)

Causes the compiler, when forming a mangled name, to include the name of any enclosing classes within which an enum is nested, thereby preventing different functions from receiving the same mangled name.

/ENDIAN
/ENDIAN={BIG | LITTLE}
/ENDIAN=LITTLE (D)

Controls whether big or little endian ordering of bytes is carried out in character constants.

/ERROR_LIMIT
/ERROR_LIMIT[=number]
/ERROR_LIMIT=30 (D)
/NOERROR_LIMIT

Limits the number of error-level diagnostic messages that are acceptable during program compilation. Compilation terminates when the limit (number) is exceeded. /NOERROR_LIMIT specifies that there is no limit on error messages.

The default is /ERROR_LIMIT=30 , which specifies that compilation terminates after issuing 30 error messages.

/EXCEPTIONS
/EXCEPTIONS=CLEANUP (D)
/EXCEPTIONS=NOCLEANUP
/EXCEPTIONS=EXPLICIT (D)
/EXCEPTIONS=IMPLICIT
/NOEXCEPTIONS

Controls whether support for C++ exceptions is enabled or disabled. C++ exceptions are enabled by default (equivalent to /EXCEPTIONS=CLEANUP). When C++ exceptions are enabled, the compiler generates code for throw expressions, try blocks, and catch statements. The compiler also generates special code for main programs so that the terminate() routine is called for unhandled exceptions. You can select from the following options:
CLEANUP Generate cleanup code for automatic objects. When an exception is handled at run-time and control passes from a throw-point to a handler, call the destructors for all automatic objects that were constructed because the try-block containing the handler was entered.
NOCLEANUP Do not generate cleanup code. Using this option can reduce the size of your executable when you want to throw and handle exceptions and cleanup of automatic objects during exception processing is not important for your application.
EXPLICIT Tells the compiler to assume the standard C++ rules about exceptions. Catch clauses can catch only those exceptions resulting from the evaluation of a throw expression within the body of the catch clause's try block or from within a procedure called from within the catch clause's try block.
IMPLICIT Tells the compiler that an exception might be thrown at any time the program is executing code within the body of the try block. These exceptions might be the result of a throw expression, hardware errors, or software errors (such as dereferencing an invalid pointer).

Specifying /EXCEPTIONS=IMPLICIT seriously interferes with the compiler's ability to optimize code. When the compiler optimizes a function, it must ensure that the values of all variables after an exception is caught remain the same as they were at the point where the exception was throw. The optimizer is therefore limited in its ability to rearrange stores and expressions that might cause an exception to be thrown.

With /EXCEPTIONS=EXPLICIT, this is not a serious restriction, because the compiler cannot rearrange stores and expressions around the code that explicitly raises an exception. In implicit exception mode, however, almost any code has the potential to cause an exception to be thrown, thereby dramatically reducing the optimizer's ability to rearrange code.

Also, if the compiler can determine that no throw expressions occur within a try block, it can eliminate the exception handling overhead the try block introduces, including all code within the catch clauses associated with the try block. Because no exceptions can occur during the execution of the code within the try block, no code within the catch clauses can ever be executed. The compiler cannot do this with /EXCEPTIONS=IMPLICIT.

Use /EXCEPTIONS=IMPLICIT if your program converts signals to C++ exceptions by calling cxxl$set_condition(cxx_exception). Failure to do so may result in your code not catching the exceptions produced by signals.

For example, consider the following routine:


        void f(int *p) {
            try {
                *p = 2;
            } catch (...) {
                ...
            }
        }

Failure to compile the routine with /EXCEPTIONS=IMPLICIT may result in a failure to catch the exception generated by the SIGBUS signal that occurs if p is 0. This is because the compiler sees that there are no throws nor procedure calls within f and therefore optimizes away the try block leaving:


        void f(int *p) {
            *p = 2;
        }

Except for those OpenVMS conditions that result in the delivery of signals, if you raise a condition explicitly using a mechanism such as LIB$SIGNAL, you may use /EXCEPTIONS=EXPLICIT.

The /NOEXCEPTIONS qualifier disables C++ exceptions as follows:

  1. The compiler issues warnings for throw expressions, try blocks, and catch statements, but might generate code for these constructs.
  2. The compiler does not generate cleanup code for automatic objects.
  3. The compiler does not generate special code for main programs so that the terminate() function is called for unhandled exceptions.

The /EXCEPTIONS qualifer defines the macro __EXCEPTIONS.

/EXTERN_MODEL
/EXTERN_MODEL=option
/EXTERN_MODEL=RELAXED_REFDEF (D)

In conjunction with the /SHARE_GLOBALS qualifier, controls the initial extern model of the compiler. Conceptually, the compiler behaves as if the first line of the program being compiled was a #pragma extern_model directive with the model and psect name, if any, specified by the /EXTERN_MODEL qualifier and with the SHR or NOSHR keyword specified by the /SHARE_GLOBALS qualifier.

For example, assume the command line contains the following qualifier:


/EXTERN_MODEL=STRICT_REFDEF="MYDATA"/NOSHARE

The compiler acts as if the program began with the following line:


      #pragma extern_model strict_refdef "MYDATA" noshr

For more information on the various models, see Section 2.1.1.3.

The /EXTERN_MODEL qualifier takes the following options, which have the same meaning as for the #pragma extern_model directive:

COMMON_BLOCK
RELAXED_REFDEF
STRICT_REFDEF=["NAME"]
GLOBALVALUE

The default is RELAXED_REFDEF.

/FLOAT
/FLOAT=option

Controls the format of floating-point variables. Representation of double variables defaults to G_FLOAT format if not overridden by another format with the /FLOAT or /G_FLOAT qualifier.

If you are linking against object-module libraries, and /PREFIX=ALL is not specified on the command line, a program compiled with G_FLOAT format must be linked with the object library VAXCRTL.OLB; a program compiled with D_FLOAT format must be linked with VAXCRTLD.OLB, and a program compiled with IEEE_FLOAT format must be linked with VAXCRTLT.OLB. The VAXCRTLX.OLB, VAXCRTLDX.OLB, and VAXCRTLTX.OLB libraries are used for the same floating-point formats, respectively, but include support for X_FLOAT format ( /L_DOUBLE_SIZE=128 ).

If you specify /PREFIX=ALL , there is no need to link to the above-mentioned *.OLB object libraries. All the symbols you need are in STARLET.OLB.

Options are as follows:

Option Usage
D_FLOAT Represent double variables in D-FLOAT format.
G_FLOAT Represent double variables in G-FLOAT format.
IEEE_FLOAT Represent float and double variables in IEEE floating-point format (IEEE S_FLOAT and T_FLOAT, respectively.)

/G_FLOAT
/NOG_FLOAT

Controls the format of floating-point variables.

The /[NO]G_FLOAT qualifier is replaced by the /FLOAT qualifier, but is retained for compatibility.

If you specify /NOG_FLOAT , double variables are represented in D_FLOAT format. On OpenVMS Alpha systems, representation of double variables defaults to G_FLOAT format if not overridden by another format with the /FLOAT or /G_FLOAT qualifier.

If you specify /NOG_FLOAT , double variables are represented in D_FLOAT format.

If you are linking against object-module libraries, and /PREFIX=ALL is not specified on the command line, a program compiled with G_FLOAT format must be linked with the object library VAXCRTL.OLB; a program compiled with D_FLOAT format must be linked with VAXCRTLD.OLB; and a program compiled with IEEE_FLOAT format must be linked with VAXCRTLT.OLB. The VAXCRTLX.OLB, VAXCRTLDX.OLB, and VAXCRTLTX.OLB libraries are used for the same floating-point formats, respectively, but include support for X_FLOAT format ( /L_DOUBLE_SIZE=128 ).

If you specify /PREFIX=ALL , there is no need to link to the above-mentioned *.OLB object libraries. All the symbols you need are in STARLET.OLB.

/GRANULARITY
/GRANULARITY=option
/GRANULARITY=QUADWORD (D)

Specifies how much memory can be cached in registers for memory references, by the combination of the compiler and the underlying system. For example, the default of quadword granularity allows the compiler and the system to cache up a quadword. If access to data in the same granularity unit occurs simultaneously, corruption (by storing back stale values) can occur. Specifying smaller granularity values can adversely affect performance and code size.

Granularity has two aspects: references inside a particular data segment and references between data segments.

The options are: BYTE , LONGWORD , and QUADWORD . The default is /GRANULARITY=QUADWORD .

/IEEE_MODE
/IEEE_MODE=option
/IEEE_MODE=FAST (D)

Selects the IEEE floating-point mode to be used if the /float=ieee_float qualifier is specified. The options are as follows:
Option Usage
FAST During program execution, only finite values (no infinities, NaNs, or denorms) are created. Exceptional conditions, such as floating-point overflow and divide-by-zero, are fatal. This is the default option.
UNDERFLOW_TO_ZERO Generate infinities and NaNs. Flush denormalized results and underflow to zero without exceptions.
DENORM_RESULTS Same as the UNDERFLOW_TO_ZERO option, except that denorms are generated.
INEXACT Same as the DENORM_RESULTS option, except that inexact values are trapped. This is the slowest mode.

/IMPLICIT_INCLUDE
/IMPLICIT_INCLUDE (D)
/NOIMPLICIT_INCLUDE

/IMPLICIT_INCLUDE enables inclusion of source files as a method of finding definitions of template entities. By default it is enabled for normal compilation, and disabled for preprocessing only. The search rules for finding template definition files is the same as for include files.

/NOIMPLICIT_INCLUDE disables inclusion of source files as a method of finding definitions of template entities. You might want to use this option in conjunction with the /STANDARD=MS command line option, to match more closely the behavior on Microsoft C++.

/INCLUDE_DIRECTORY
/INCLUDE_DIRECTORY=(place[,...])
/NOINCLUDE_DIRECTORY (D)

Provides an additional level of search for user-defined include files. Each pathname argument can be either a logical name or a legal UNIX style directory in a quoted string. The default is /noinclude_directory .

The /include_directory qualifier provides functionality similar to the -I option of the cxx command on Tru64 UNIX systems. This qualifier allows you to specify additional locations to search for files to include. Putting an empty string in the specification prevents the compiler from searching any of the locations it normally searches but directs it to search only in locations you identify explicitly on the command line with the /include_directory and /library qualifiers (or by way of the specification of the primary source file, depending on the /nested_include_directory qualifier).

The basic order for searching depends on the form of the header name (after macro expansion), with additional aspects controlled by other command line qualifiers as well as the presence or absence of logical name definitions. The valid possibilities for names are as follows:

  • Enclosed in quotes. For example: "stdio.h"
  • Enclosed in angle brackets. For example: <stdio.h>

Unless otherwise defined, searching a location means that the compiler uses the string specifying the location as the default file specification in a call to an RMS system service (that is, a $SEARCH/$PARSE) with a primary file specification consisting of the name in the #include (without enclosing delimiters). The search terminates successfully as soon as a file can be opened for reading.

Specifying a null string in the /INCLUDE qualifier causes the compiler to do a non-standard search. This search path is as follows:

  1. The current directory (quoted form only)
  2. Any directories specified in the /INCLUDE qualifier
  3. The directory of the primary input file
  4. Text libraries specified on the command line using /LIBRARY

For standard searches, the search order is as follows:

  1. Search the current directory (directory of the source being processed). If angle-bracket form, search only if no directories are specified with /INCLUDE_DIRECTORY .
  2. Search the locations specified in the /INCLUDE_DIRECTORY qualifier (if any).
  3. If CXX$SYSTEM_INCLUDE is defined as a logical name, search CXX$SYSTEM_INCLUDE:.HXX or just CXX$SYSTEM_INCLUDE:., depending on the qualifier /ASSUME=NOHEADER_TYPE_DEFAULT . If nothing is found, go to step 6.
  4. If CXX$LIBRARY_INCLUDE is defined as a logical name, CXX$LIBRARY_INCLUDE:.HXX or CXX$LIBRARY_INCLUDE:., depending on the qualifier /ASSUME=NOHEADER_TYPE_DEFAULT . If nothing is found, go to step 6.
  5. If /ASSUME=HEADER_TYPE_DEFAULT is not specified, search the default list of locations for plain-text copies of compiler header files as follows:
    SYS$COMMON:[CXX$LIB.INCLUDE.CXXL$ANSI_DEF]
    SYS$COMMON:[CXX$LIB.INCLUDE.DECC$RTLDEF_HXX].HXX
    SYS$COMMON:[CXX$LIB.INCLUDE.DECC$RTLDEF].H
    SYS$COMMON:[CXX$LIB.INCLUDE.SYS$STARLET_C].H

    If /ASSUME=HEADER_TYPE_DEFAULT is specified, search the default list of locations for plain-text copies of compiler header files as follows:
    SYS$COMMON:[CXX$LIB.INCLUDE.DECC$RTLDEF_HXX].HXX
    SYS$COMMON:[CXX$LIB.INCLUDE.DECC$RTLDEF].H
    SYS$COMMON:[CXX$LIB.INCLUDE.SYS$STARLET_C].H
    SYS$COMMON:[CXX$LIB.INCLUDE.CXXL$ANSI_DEF]
  6. Search the directory of the primary input file.
  7. If quoted form, and CXX$USER_INCLUDE is defined as a logical name, search CXX$USER_INCLUDE:.HXX or CXX$USER_INCLUDE:., depending on the /ASSUME=NOHEADER_TYPE_DEFAULT qualifier.
  8. Search the text libraries. Extract the simple file name and file type from the #include specification, and use them to determine a module name for each text library. There are three forms of module names used by the compiler:
    1. type stripped:
      The file type will be removed from the include file specification to form a library module name. Examples:
      #include "foo.h" Module name "FOO"
      #include "foo" Module name "FOO"
      #include "foo" Module name "FOO"
    2. type required:
      The file type must be a part of the file name. Examples:
      #include "foo.h" Module name "FOO.H"
      #include "foo" Module name "FOO."
      #include "foo" Module name "FOO."
    3. type optional:
      First an attempt is made to find a module with the type included in the module name. If this is unsuccessful, an attempt is made with the type stripped from the module name. If this is unsuccessful, the search moves on to the next library.

    If /ASSUME=HEADER_TYPE_DEFAULT is specified, the following text libraries are searched in this order:
    Libraries specified on the command line with the /LIBRARY qualifier (all files, type stripped)
    CXX$TEXT_LIBRARY (all files, type stripped)
    DECC$RTLDEF (H files and unspecified files, type stripped)
    SYS$STARLET_C (all files, type stripped)
    CXXL$ANSI_DEF (unspecified files, type stripped)

    Otherwise, these text libraries are searched in this order:
    Libraries specified on the command line with the /LIBRARY qualifier (all files, type optional)
    CXX$TEXT_LIBRARY (all files, type optional)
    CXXL$ANSI_DEF (all files, type required)
    DECC$RTLDEF (H files and unspecified files, type stripped)
    SYS$STARLET_C (all files, type stripped)

    Two text library search examples (stop when something is found):

    Example 1


    #include "foo"
    
    1. For each library specified via the /LIBRARY qualifier:
      - Look for "FOO."
      - Look for "FOO"
    2. Look for "FOO." in CXX$TEXT_LIBRARY
    3. Look for "FOO" in CXX$TEXT_LIBRARY
    4. Look for "FOO." in CXXL$ANSI_DEF (Do not look for "FOO" because the type is required as part of the module name)
    5. Look for "FOO" in DECC$RTL_DEF (not "FOO." because the type must not be part of the module name)
    6. Look for "FOO" in SYS$STARLET_C (not "FOO." because the type must not be part of the module name)

    Example 2


    #include "foo.h"
    
    1. For each library specified via the /LIBRARY qualifier:
      - Look for "FOO.H"
      - Look for "FOO"
    2. Look for "FOO.H" in CXX$TEXT_LIBRARY
    3. Look for "FOO" in CXX$TEXT_LIBRARY
    4. Look for "FOO.H" in CXXL$ANSI_DEF (Do not look for "FOO" because the type is required as part of the module name)
    5. Look for "FOO" in DECC$RTL_DEF (not "FOO.H" because the type must not be part of the module name)
    6. Look for "FOO" in SYS$STARLET_C (not "FOO.H" because the type must not be part of the module name)
    7. If neither CXX$LIBRARY_INCLUDE nor CXX$SYSTEM_INCLUDE is defined as a logical name, then search SYS$LIBRARY:.HXX.

/INSTRUCTION_SET
/INSTRUCTION_SET=FLOATING_POINT (D)
/INSTRUCTION_SET=NOFLOATING_POINT

Suppresses the generation of floating-point instructions for integer operations. The default is /INSTRUCTION_SET=FLOATING_POINT .

/L_DOUBLE_SIZE
/L_DOUBLE_SIZE=option
/L_DOUBLE_SIZE=128 (D)

Determines how the compiler interprets the long double type. The qualifier options are 64 and 128.

Specifying /L_DOUBLE_SIZE=64 treats all long double references as G_FLOAT, D_FLOAT, or T_FLOAT, depending on the value of the /FLOAT qualifier.

Specifying /L_DOUBLE_SIZE=128 treats all long double references as X_FLOAT. The /L_DOUBLE_SIZE=128 option also defines the macro __X_FLOAT=1. This is the default. Specifying /L_DOUBLE_SIZE=64 , defines the macro __X_FLOAT=0.

/LIBRARY

Indicates that the associated input file is a text library containing source text modules specified in #include directives. The compiler searches the specified library for all #include module names that are not enclosed in angle brackets or quotation marks. The name of the library must be concatenated with the file specification using a plus sign. For example: CXX DATAB/LIBRARY+APPLICATION

/LINE_DIRECTIVES
/LINE_DIRECTIVES (D)
/NOLINE_DIRECTIVES

Controls whether #line directives appear in preprocessed output files.

/LIST
/LIST[=file-spec] (Batch default)
/NOLIST (Interactive default)

Controls whether a listing file is produced. The default output file extension is .LIS.

/MACHINE_CODE
/NOMACHINE_CODE (D)

Controls whether the listing produced by the compiler includes the machine language code generated during the compilation. If you use this qualifier you also need to use the /LIST qualifier. This option does not generate a listing file when object file generation is turned off (using the /NOOBJECT option).

/MEMBER_ALIGNMENT
/MEMBER_ALIGNMENT (D)
/NOMEMBER_ALIGNMENT

Directs the compiler to naturally align data structure members. This means that data structure members are aligned on the next boundary appropriate to the type of the member, rather than on the next byte. For instance, a long variable member is aligned on the next longword boundary; a short variable member is aligned on the next word boundary.

Any use of the #pragma member_alignment or #pragma nomember_alignment directives within the source code overrides the setting established by this qualifier. Specifying /NOMEMBER_ALIGNMENT causes data structure members to be byte-aligned (with the exception of bit-field members).

/MMS_DEPENDENCIES
/MMS_DEPENDENCIES[=(option[,option)]]
/NOMMS_DEPENDENCIES (D)

Instructs the compiler to produce a dependency file. The format of the dependency file is as follows:


object_file_name:<tab><source file name>
object_file_name:<tab><full path to first include file>
object_file_name:<tab><full path to second include file>

You can specify none, one, or both of the following qualifier options:

FILE[=filespec] Specifies where to save the dependency file. The default file extension for a dependency file is .mms. Other than using a different default extension, this qualifier uses the same procedure that /OBJECT and /LIST use for determining the name of the output file.
SYSTEM_INCLUDE_FILES Specifies whether to include dependency information about system include files (that is, those included with #include <filename>). The default is to include dependency information about system include files.

/MODEL
/MODEL=[ANSI | ARM]
/MODEL=ARM (D)

Determines the layout of C++ classes, name mangling, and exception handling.

The /MODEL=ARM qualifier is the default and generates objects that are link compatible with all releases prior to Compaq C++ version 6.3, and with all objects compiled with the /MODEL=ARM qualifier in releases of Compaq C++ Version 6.3 or later. Specifying this option defines the macro __MODEL_ARM.

The /MODEL=ANSI qualifier supports the complete ISO/ANSI C++ specification, including distinct name mangling for templates. The ANSI model also reduces the size of C++ non-POD class objects. Note that this option generates objects that are not compatible with all prior and future releases of Compaq C++, or with objects compiled using the /MODEL=ARM qualifier.

If you specify the /MODEL=ANSI qualifier, you must recompile and relink (using CXXLINK/MODEL=ANSI) your entire application, including libraries. Specifying this option defines the macro __MODEL_ANSI.

/NAMES
/NAMES=(option[,...])
/NAMES=(UPPERCASE,TRUNCATED) (D)

Specifies whether the compiler translates all external symbol names to uppercase, lowercase, or leaves the case unchanged, and whether the names are truncated to 31 characters or shortened by special encoding. /NAMES=UPPERCASE causes all external names to be converted to uppercase. /NAMES=AS_IS leaves the case of external names unchanged. /NAMES=TRUNCATED truncates long external names to the first 31 characters. If external names are identical up to 31 characters, you can specify /NAMES=SHORTENED to create specially encoded 31-character names. All modules in an application containing long external names must be compiled consistently with either /NAMES=TRUNCATED or /NAMES=SHORTENED .

All long C++ external names are shortened by default, /NAMES=TRUNCATED has no effect on C++ external names. All long C external names are truncated by default, you may specify /NAMES=SHORTENED to change this behavior.

/NESTED_INCLUDE_DIRECTORY
/NESTED_INCLUDE_DIRECTORY[=option]
/NESTED_INCLUDE_DIRECTORY=INCLUDE_FILE (D)

Controls the first step in the search algorithm the compiler uses when looking for files included using the quoted form of the #include preprocessing directive: #include "file-spec" The /NESTED_INCLUDE_DIRECTORY qualifier has the following options:
Option Usage
PRIMARY_FILE Directs the compiler to search the default file type for headers using the context of the primary source file. This means that only the file type (".H" or ".") is used for the default file-spec but, in addition, the chain of "related file-specs" used to maintain the sticky defaults for processing the next top-level source file is applied when searching for the include file.
INCLUDE_FILE Directs the compiler to search the directory containing the file in which the #include directive itself occurred. The meaning of "directory containing" is: the RMS "resultant string" obtained when the file in which the #include occurred was opened, except that the filename and subsequent components are replaced by the default file type for headers (".H", or just "." if /ASSUME=NOHEADER_TYPE_DEFAULT is in effect). The "resultant string" will not have translated any concealed device logical.
NONE Directs the compiler to skip the first step of processing #include "file.h" directives. The compiler starts its search for the include file in the /INCLUDE_DIRECTORY directories.

For more information on the search order for included files, see the /INCLUDE_DIRECTORY qualifier.

/OBJECT
/OBJECT[=file-spec]
/OBJECT=.obj (D)
/NOOBJECT

Controls whether the compiler produces an output object module. The default output file extension is .OBJ.

Note that the /OBJECT qualifier has no impact on the output file of the /MMS_DEPENDENCIES qualifier.

/OPTIMIZE
/OPTIMIZE[=option]
/OPTIMIZE=(INLINE=AUTOMATIC,LEVEL=4,INTRINSICS,UNROLL=0,
TUNE=GENERIC) (D)
/NOOPTIMIZE

Controls the level of code optimization that the compiler performs. The options are as follows:
Option Usage
LEVEL= n Selects the level of code optimization. Specify an integer from 0 (no optimization) to 5 (full optimization).
[NO]INLINE Controls the inline expansion of functions for code optimization. Specifying /OPTIMIZE=INLINE tells the compiler you want inline expansion. Specifying /OPTIMIZE=NOINLINE is equivalent to specifying /OPTIMIZE=LEVEL=3. To control inlining, you can specify one of the following keywords:
NONE Prevents inline optimization, even if requested by defining a member function in the class body or by using the inline keyword.
MANUAL Inlines only those function calls for which the program explicitly requests inlining.
AUTOMATIC Inlines all of the function calls in the MANUAL category plus any additional calls that the compiler determines would improve run-time performance without significantly increasing the size of the program.
SIZE Same as AUTOMATIC.
SPEED Performs more agressive inlining than
/OPTIMIZE=INLINE=SIZE to improve run-time performance even if the size of the program is significantly increased.
ALL Inlines every call that can be inlined while still generating correct code and preventing recursive routines from causing an infinite loop at compile time.
Option Usage
TUNE Specifies the preferred processor for execution. This option makes some decisions preferentially for the specified processor (for example, for code scheduling). Note that code valid only for the specified processor can be generated. However, parallel code can be generated for processors down to the specified architecture level if necessary; that is, tuning specifies the preferred target, while architecture level specifies a lower boundary on available processor features.

For example, /ARCHITECTURE=EV56/OPTIMIZE=TUNE=EV6 specifies that the code does not need to run on a processor older than an EV56, and that the code will probably run on an EV6. The generated code will run on all EV56 and later systems without any emulation. The code might have run-time selected conditional regions specifically for EV6. Also, note that because emulation is provided, the code should run, but potentially at very significantly reduced speed, on pre-EV56 processors.

The options for TUNE are the same as the options for /ARCH . You can specify one of the following keywords:

GENERIC Selects instruction tuning that is appropriate for all implementations of the operating system architecture. This option is the default.
HOST Selects instruction tuning that is appropriate for the machine on which the code is being compiled.
EV4 Selects instruction tuning for the 21064, 21064A, 21066, and 21068 implementations of the operating system architecture.
EV5 Selects instruction tuning for the 21164 implementation of the operating system architecture.
EV56 Selects instruction tuning for 21164 chip implementations that use the byte- and word-manipulation instruction extensions of the Alpha architecture.

Running programs compiled with the EV56 keyword might incur emulation overhead on EV4 and EV5 processors, but will still run correctly on OpenVMS Version 7.1 (or later) systems.

PCA56 Selects instruction tuning for the 21164PC chip implementation that uses the byte- and word-manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture.

Programs compiled with the PCA56 keyword might incur emulation overhead on EV4, EV5, and EV56 processors, but will still run correctly on OpenVMS Version 7.1 (or later) systems.

[NO]INTRINSICS Controls whether certain functions are handled as intrinsic functions without explicitly enabling each of them as an intrinsic through the #pragma intrinsic preprocessor directive.

Functions that can be handled as intrinsics are:

Main Group - ANSI:

abs atanl atan2l ceill cosl floorf memcpy sinf

atan atan ceil cos fabs floorl memmove sinl
atanf atan2f ceilf cosf floor labs memset strcpy
sin strlen

Main Group - Non-ANSI:

 alloca atand2 bzero sind

atand bcopy cosd

Printf functions:

 fprintf printf sprintf

Printf non-ANSI:

 snprintf

ANSI math functions that set errno, thereby requiring /ASSUME=NOMATH_ERRNO:

acos asinf coshl log log10f powl sqrt tanf

acosf asinl exp logf log10l sinh sqrtf tanl
acosl cosh expf logl pow sinhf sqrtl tanh
asin coshf expl log10 powf sinhl tan tanhf
tanhl

Non-ANSI math functions that set errno, thereby requiring /ASSUME=NOMATH_ERRNO:

 log2 tand

The /OPTIMZE=INTRINSICS qualifier works with /OPTIMIZE=LEVEL=n and some other qualifiers to determine how intrinsics are handled:

  • If the optimization level specified is less than 4, the intrinsic-function prototypes and call formats are checked, but normal run-time calls are still made.
  • If the optimization level is
  • or higher, intrinsic code is generated.
  • Intrinsic code is not generated for math functions that set the errno variable unless /ASSUME=NOMATH_ERRNO is specified. Such math functions, however, do have their prototypes and call formats checked.

    The default is /OPTIMIZE=INTRINSICS , which turns on this handling.

    To turn it off, specify /NOOPTIMIZE or /OPTIMIZE=NOINTRINSICS .

UNROLL= n Controls loop unrolling done by the optimizer. Specify a positive integer to indicate the number of times to unroll loop bodies. If you specify 0 or do not supply a value, the optimizer uses its own default unroll amount. The default is UNROLL=0.

The default is /OPTIMIZE , which is equivalent to /OPTIMIZE=LEVEL=4 .

/PENDING_INSTANTIATIONS
/PENDING_INSTANTIATIONS[=n]
/PENDING_INSTANTIATIONS=64(D)

Limit the depth of recursive instantiations so that infinite instantiation loops can be detected before some resource is exhausted. The /PENDING_INSTANTIATIONS qualifier requires a positive non-zero value as argument and issues an error when n instantiations are pending for the same class template. The default value for n is 64.

/POINTER_SIZE
/POINTER_SIZE=option
/NOPOINTER_SIZE (D)

Controls whether pointer-size features are enabled, and whether pointers are 32 bits or 64 bits long.

The default is /NOPOINTER_SIZE , which disables pointer-size features, such as the ability to use #pragma pointer_size, and directs the compiler to assume that all pointers are 32-bit pointers. This default represents no change over previous versions of Compaq C++.

You must specify one of the following options:

SHORT The compiler assumes 32-bit pointers.
32 Same as SHORT.
LONG The compiler assumes 64-bit pointers.
64 Same as LONG.

Specifying /POINTER_SIZE=3 directs the compiler to assume that all pointers are 32-bit pointers. But unlike the default of /NOPOINTER_SIZE , /POINTER_SIZE=3 enables use of the #pragma pointer_size long and #pragma pointer_size short preprocessor directives to control pointer size throughout your program.

Specifying /POINTER_SIZE=64 directs the compiler to assume that all pointers are 64-bit pointers, and also enables use of the #pragma pointer_size directives.

/PREFIX_LIBRARY_ENTRIES
/PREFIX_LIBRARY_ENTRIES=(option,...)
/NOPREFIX_LIBRARY_ENTRIES
/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES (D)

Controls C Run-Time Library (RTL) name prefixing. For user programs that do not include the ANSI header files but call the ANSI library, the compiler automatically adds a DECC$ prefix to all C RTL library calls just before the name for the external reference or global definition is put into the object file. The C RTL shareable image (DECC$SHR.EXE) resides in IMAGELIB.OLB with a DECC$ prefix for its entry points. Every external name in IMAGELIB.OLB has a DECC$ prefix, and, therefore, has an OpenVMS-conformant name space (a requirement for inclusion in IMAGELIB).

The options are as follows:

Option Usage
EXCEPT= (name ,...) The names specified are not prefixed.
ALL_ENTRIES All Compaq C++ names are prefixed.
ANSI_C89_ENTRIES Only ANSI/ISO C library names are prefixed.
RTL= name References to the C RTL, indicated by NAME, are generated. NAME must be 1017 characters or fewer.

If you want no names prefixed, specify /NOPREFIX_LIBRARY_ENTRIES .

/PREPROCESS_ONLY
/PREPROCESS_ONLY[=filename]
/NOPREPROCESS_ONLY (D)

Causes the compiler to perform only the actions of the preprocessor phase and write the resulting processed text out to a file. The default output file extension is .IXX.

/PSECT_MODEL
/PSECT_MODEL=MULTILANGUAGE
/PSECT_MODEL=NOMULTILANGUAGE (D)

Controls whether the compiler allocates the size of overlaid psects to ensure compatibility when the psect is shared by code created by other Compaq compilers.

This switch solves a problem that can occur when a psect generated by a Fortran COMMON block is overlaid with a psect consisting of a C struct. Because Fortran COMMON blocks are not padded, if the C struct is padded, the inconsistent psect sizes can cause linker error messages.

Compiling with /PSECT_MODEL=MULTILANGUAGE ensures that the compiler uses a consistent psect size allocation scheme. The corresponding Fortran squalifier is /ALIGN=COMMON=[NO]MULTILANGUAGE .

The default is /PSECT=NOMULTILANGUAGE , which should be sufficient for most applications.

/QUIET
/QUIET
/NOQUIET (D)

Specifying /QUIET causes the compiler to report errors like the Version 5.n compiler (issue fewer messages). This is the default for ARM mode ( /STANDARD=ARM ). All other modes default to /NOQUIET .

Use /WARNINGS=ENABLE to enable specific messages normally disabled with /QUIET .

/REENTRANCY
/REENTRANCY=option
/REENTRANCY=TOLERANT (D)

Controls the type of reentrancy that reentrant Compaq C RTL routines exhibit. (See also the DECC$SET_REENTRANCY RTL routine.)

This qualifier is for use only with a module containing the main routine.

The reentrancy level is set at run time according to the /REENTRANCY qualifier specified while compiling the module containing the main routine. This option affects the behavior of the C RTL, but has no effect on the C++ libraries.

You can specify one of the following options:

Option Usage
AST Uses the __TESTBITSSI built-in function to perform simple locking around critical sections of RTL code, and may additionally disable asynchronous system traps (ASTs) in locked region of codes. This type of locking should be used when AST code contains calls to DEC C RTL I/O routines.
MULTITHREAD Designed to be used in conjunction with the DECthreads product. It performs DECthreads locking and never disables ASTs.
NONE Gives optimal performance in the RTL, but does absolutely no locking around critical sections of RTL code. It should be used only in a single threaded environment when there is no chance that the thread of execution will be interrupted by an AST that would call the Compaq C RTL.
TOLERANT Uses the __TESTBITSSI built-in function to perform simple locking around critical sections of RTL code, but ASTs are not disabled. This type of locking should be used when ASTs are used and must be delivered immediately. This is the default reentrancy type.

/REPOSITORY
/REPOSITORY=(PATHNAME [,...])
/REPOSITORY=[.CXX_REPOSITORY] (D)

Specifies a repository that C++ uses to store requested template instantiations. The default is /REPOSITORY=[.CXX_REPOSITORY]. If multiple repositories are specified, only the first is considered writable and the default repository is ignored unless specified.

/ROUNDING_MODE
/ROUNDING_MODE=option
/ROUNDING_MODE=NEAREST (D)

Lets you select an IEEE rounding mode if /FLOAT=IEEE_FLOAT is specified. The options are as follows:
Option Usage
CHOPPED Rounds toward 0.
DYNAMIC Sets the rounding mode for IEEE floating-point instructions dynamically, as determined from the contents of the floating-point control register.
MINUS_INFINITY Rounds toward minus infinity.
NEAREST Sets the normal rounding mode (unbiased round to nearest). This is the default.

If you specify either /FLOAT=G_FLOAT or /FLOAT=D_FLOAT , then rounding defaults to /ROUNDING_MODE=NEAREST , with no other choice of rounding mode.

/RTTI
/RTTI (D)
/NORTTI

Enables or disables support for RTTI (runtime type identification) features: dynamic_cast and typeid. Disabling runtime type identification can also save space in your object file because static information to describe polymorphic C++ types is not generated. The default is to enable runtime type information features and generate static information in the object file. The /RTTI qualifier defines the macro __RTTI.

Note that specifying /NORTTI does not disable exception handling.

/SHARE_GLOBALS
/SHARE_GLOBALS
/NOSHARE_GLOBALS (D)

Controls whether the initial extern_model is shared or not shared (for those extern_models where it is allowed). The initial extern_model of the compiler is a fictitious pragma constructed from the settings of the /EXTERN_MODEL and /SHARE_GLOBALS .

The default value is /NOSHARE_GLOBALS , which has the following effects:

  • When linking old object files or object libraries with newly produced object files, you might get "conflicting attributes for psect" messages, which can be safely ignored as long as you are not building shareable libraries.
  • The /noshare_globals default makes building shareable libraries easier.

/SHOW
/SHOW=(option[,...])
/SHOW=(SOURCE,HEADER) (D)

Used with the /LIST qualifier to set or cancel specific listing options. You can select the following options:
Option Usage
ALL Print all listing information.
[NO]HEADER Print/do not print header lines at the top of each page (D = HEADER)
[NO]INCLUDE Print/do not print contents of #include files (D = NOINCLUDE)
NONE Print no listing information
[NO]SOURCE Print/do not print source file statements (D = SOURCE)
[NO]STATISTICS Print/do not print compiler performance statistics (D = NOSTATISTICS)

/STANDARD
/STANDARD=(option)

The compiler implements the International ANSI C++ Standard. The /STANDARD qualifier directs the compiler to interpret source code according to certain nonstandard syntax conventions followed by other implementations of the C++ language. The options are:
Option Usage
ANSI Allow language constructs required by the International ANSI C++ Standard. This mode also supports some non-ANSI extensions and issues messages for some non-standard usage that does not strictly comply with the standard. This is the default compiler mode. This option also defines the macro __STD_ANSI.
ARM Minimize source changes when compiling programs developed using Version 5.n. This option also defines the macro __STD_ARM. The /STANDARD=ARM qualifier uses the pre-ansi AT&T version of the iostream library and defines the macro __NO_USE_STD_IOSTREAM.
CFRONT Allow language constructs supported by the CFRONT translator. This option also defines the macro __STD_CFRONT. The /STANDARD=CFRONT qualifier uses the pre-ansi AT&T version of the iostream library and defines the macro __NO_USE_STD_IOSTREAM.
GNU Use this option if you want to compile programs developed using the GNU C++ compiler. This option also defines the __STD_GNU macro. The /STANDARD=GNU qualifier uses the pre-ansi AT&T version of the iostream library and defines the macro __NO_USE_STD_IOSTREAM. The following changes in behavior are provided for compatibility with the GNU C++ compiler:
  • These options are enabled by default:
    /ALTERNATIVE_TOKENS
    
    /TEMPLATE_DEFINE=LOCAL
    /NO_IMPLICIT_INCLUDE
  • Access control is not enforced for types defined inside a class.
  • Unrecognized character escape sequences in string literals produce an informational instead of a warning message.
  • The __INLINE keyword is enabled and is equivalent to inline.
  • The severity of the error "incompatible parameter" (tag incompatibleprm) is reduced to warning.
  • When overloading, enum types are treated as integral types.

The following known incompatibility is not addressed in the /STANDARD=GNU mode:

  • The compiler strictly enforces the requirement to define functions before they are used. This requirement also applies to built-in functions such as strlen.
MS Allow language constructs supported by the Visual C++ compiler. This option also defines the macro __STD_MS. The /STANDARD=MS qualifier uses the pre-ansi AT&T version of the iostream library and defines the macro __NO_USE_STD_IOSTREAM.
STRICT_ANSI Enforce the ANSI standard strictly but permit some ANSI violations that should be errors to be warnings. This option also defines the macro __STD_STRICT_ANSI. To force ANSI violations to be issued as errors instead of warnings, use /WARNINGS=ANSI_ERRORS in addition to /STANDARD=STRICT_ANSI . This combination defines the macro __STD_STRICT_ANSI_ERRORS. The /STANDARD=STRICT_ANSI qualifier uses the ANSI/ISO standard version of the iostream library and defines the macro __USE_STD_IOSTREAM.

For more information on the effect of the /STANDARD qualifier on Compaq C++ compile-time error checking, Section 4.1.

/TEMPLATE_DEFINE
/TEMPLATE_DEFINE=(option,...)
/NOTEMPLATE_DEFINE

Controls compiler behavior pertaining to the instantiation of C++ templates. See Chapter 5. for details on how to instantiate templates using this qualifier.

/UNDEFINE
/UNDEFINE=(identifier[,...])
/NOUNDEFINE (D)

Performs the same function as the #undefine preprocessor directive: it cancels a macro definition.

The /UNDEFINE qualifier is useful for undefining the predefined C++ preprocessor constants. For example, if you use a preprocessor constant to conditionally compile segments of code specific to C++ for OpenVMS systems, you can undefine constants to see how the portable sections of your program execute. For example:


 /UNDEFINE="deccxx"

When both /DEFINE and /UNDEFINE are present on the CXX command line, /DEFINE is evaluated before /UNDEFINE .

/UNSIGNED_CHAR
/UNSIGNED_CHAR
/NOUNSIGNED_CHAR (D)

The /UNSIGNED_CHAR qualifier changes the default for all char types from signed to unsigned. The /NOUNSIGNED_CHAR qualifier causes all plain char declarations to have the same representation and set of values as signed char declarations.

/USING_STD
/USING_STD
/NOUSING_STD (D)

Controls whether standard library header files are processed as though the compiled code were written as follows:


using namespace std;
#include <header>

These options are provided for compatibility for users who do not want to qualify use of each standard library name with std:: or put using namespace std; at the top of their sources.

/USING_STD turns implicit using namespace std on; this is the default when compiling /STANDARD=ARM , /STANDARD=CFRONT , /STANDARD=GNU , /STANDARD=MS , or /STANDARD=ANSI .

/NOUSING_STD turns implicit using namespace std off; this is the default when compiling /STANDARD=STRICT_ANSI .

/VERSION
/VERSION
/NOVERSION (D)

Causes the compiler to identify (print out) its version and operating system. The listing file also contains the compiler version. You cannot specify this qualifier with any other qualifiers.

/WARNINGS
/WARNINGS[=(option[,...])]
/WARNINGS (D)
/NOWARNINGS

Controls the issuance of of informational and warning messages. Options apply only to discretionary, warning, and informational messages. The ident variable is obtained from the error message.

Indicated messages can specify one or more message identifiers (ident) or the message group name ALL.

The default qualifier, /WARNINGS , prints all diagnostic messages. The /NOWARNINGS qualifier suppresses both the informational and the warning messages.

The options are processed and take effect in the following order:

NOWARNINGS Suppresses warnings.
[NO]INFORMATIONALS Enable or suppress informationals.
ENABLE=ALL or
(ident,...)
Enable specific messages that normally would not be issued when using /QUIET . Enable messages disabled with /WARNINGS=DISABLE .
DISABLE=ALL or
(ident,...)
Disable the message. Can be used for any nonerror message specified by a message number or tag. Specify ALL to suppress all informationals and warnings.
INFORMATIONALS=ALL
or (ident,...)
Issue all specified messages as informationals. ALL can be specified, but applies only to discretionary errors. Also, enable informationals, which are disabled by default.
WARNINGS=ALL or
(ident,...)
Issue all specified messages as warnings. ALL can be specified, but applies only to discretionary errors.
[NO]ANSI_ERRORS Issue error messages for all ANSI violations when in STRICT_ANSI mode. The default is /WARNINGS=NOANSI_ERRORS .
[NO]TAGS Display a descriptive tag at the end of each message. "D" indicates that the severity of the message can be controlled from the command line. The tag displayed can be used as the ident variable in the /WARNINGS options.
ERRORS=ALL or
(ident,...)
Issue all specified messages as errors. ALL can be specified, but applies only to discretionary errors.

/XREF
/XREF[=file-spec]
/NOXREF (D)

Controls whether the compiler generates a file of source code analysis information. The default file name is the file name of the primary source file; the default file type is .XREF. Use the SCA IMPORT command to convert an .XREF file into an analysis data file that is ready for loading into an SCA library.


Previous Next Contents Index