United States |
Command_Parameters
file-spec,...
One or more C++ source files separated by plus signs or commas. If plus signs are used, the input files are concatenated into a single object file. If commas are used, each file is compiled separately to create separate object files. If no input file type is specified, C++ assumes the .CXX default file type.
library-file-spec
A text library containing #include modules referenced in one or more of the source files. A library file specification must be concatenated with a file specification with a plus sign and qualified using the /LIBRARY qualifier. If the input file type is not specified, C++ assumes the .TLB default file type.
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.
/ALTERNATIVE_TOKENS
/NOALTERNATIVE_TOKENS D=/NOALTERNATIVE_TOKENSEnables 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 ------- ----- :> ] %: # %> } <% { <: [
/ANSI_ALIAS
/NOANSI_ALIAS D=/ANSI_ALIASDirects 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).
The default is /ANSI_ALIAS.
/ARCHITECTURE=option
D=/ARCHITECTURE=GENERICSpecifies the minimum processor level required for the code being compiled. In some cases it is possible to run on older processors with emulation, but this mode is not recommended. The code is not guaranteed to run, but if it it does run, it will not silently produce incorrect data.
The /ARCHITECTURE qualifier uses the same options (keywords) as the /OPTIMIZE=TUNE qualifier.
Whereas 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 run correctly, but can incur significant software emulation overhead at runtime.
All Alpha processors implement a core set of instructions. Certain Alpha processor versions include additional instruction extensions.
The following /ARCHITECTURE options are supported:
GENERIC or EV4 Specifies that only insturctions available on all Alpha processors should be used. GENERIC is the default.
Programs compiled with the GENERIC or EV4 options run on all implementations of the Alpha architecture without any instruction emulation overhead.
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 Same as GENERIC.
EV5 Generates code for some 21164 chip implementations of the Alpha architecture that use only the base set of Alpha instructions (no extensions).
Running programs compiled with the EV5 option runs without instruction emulation overhead on all Alpha processors.
EV56 Allows use of the Alpha byte and word ("BWX") instruction set extension. Emulation is provided for processors without direct support starting with OpenVMS 7.1.
Running programs compiled with the EV56 option can incur emulation overhead on EV4 and EV5 processors, but still runs correctly on OpenVMS Version 7.1 (or later) systems.
PCA56 Allows use of the multimedia ("MVI) instruction set extension in addition to the BWX group. Emulation is provided for older processors starting with OpenVMS 7.1.
Running programs compiled with the PCA56 option can incur emulation overhead on EV4, EV5, and EV56 processors, but still runs correctly on OpenVMS Version 7.1 (or later) systems. EV6 Allows use of instructions introduced with EV6, the EV6 floating point extensions ("FIX") and count ("CIX") extension. Emulation is provided for older versions starting with OpenVMS 7.1.
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=(option,...)
Controls compiler assumptions. You may select the following options:
[NO]WRITABLE_STRING_LITERALS
Stores string constants in a writable psect. Otherwise, such constants are placed in a nonwritable psect.
The default is /ASSUME=NOWRITABLE_STRING_LITERALS.
[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 that it points to, use the /ASSUME=NOALIGNED_OBJECTS qualifier.
[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()[].
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, 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]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 POINTERS_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 POINTERS_TO_GLOBALS does not tell the compiler that the compilation never uses pointers to access global variables.
[NO]STDNEW
Controls whether calls are generated to the ANSI or pre-ANSI implementation of the operator new(). On memory allocation failure, the ANSI implementation throws std::bad_alloc, while the pre-ANSI implementation returns 0.
STDNEW generates calls to the ANSI new() implementation; this is the default when compiling with /STANDARD=ANSI and /STANDARD=STRICT_ANSI.
NOSTDNEW generates calls to the pre-ANSI new() implementation; this is the default when compiling with /STANDARD=ARM, /STANDARD=CFRONT, and /STANDARD=MS.
[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 shorttype 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 nopointer_to_globals and possibly other optimizations.
The default is /ASSUME NOWHOLE_PROGRAM.
/CHECK[=([NO]UNINITIALIZED_VARIABLES)]
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[=option]
/NOCOMMENTS (D=SPACE)Specifies whether or not comments appear in preprocess output files. If comments do not appear, this qualifier specifies what replaces them. The option are:
AS_IS Specifies that the comment appear in the output file. This is the default if you specify /COMMENTS.
SPACE Specifies that a single space replace the comment in the output file. This is the default if you omit the /COMMENTS qualifier.
/NOCOMMENTS specifies that nothing replace the comment in the output file.
Note that the preprocessor may replace a comment at the end of the line or replace a line by itself with nothing even if you specify /COMMENTS=SPACE. The meaning of the program is not changed.
/DEBUG[=(option,...)]
/NODEBUG (D=TRACEBACK)Requests that information be included in the object module for use with the OpenVMS Debugger. You can select the following options:
ALL Includes symbol table records and traceback records. This option is equivalent to specifying /DEBUG=(TRACEBACK,SYMBOLS).
NONE Do not include any debugging information.
NOSYMBOLS Excludes symbol table records, which are only needed for symbolic debugging. This is the default if you do not specify /DEBUG on the command line.
SYMBOLS Includes symbol table records needed for symbolic debugging; supports debugging inlined functions at the point of inlining. This option can increase object file size significantly. SYMBOLS is the default if you specify /DEBUG on the command line but do not specify any options.
NOTRACEBACK Do not include traceback records.
TRACEBACK Include traceback records.
If you use /DEBUG without specifying any option, the default is /DEBUG=(TRACEBACK,SYMBOLS).
/DEFINE=(identifier[=definition][,...])
/NODEFINE D=/NODEFINEPerforms 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.
The default is /NODEFINE.
/DIAGNOSTICS[=file-spec]
/NODIAGNOSTICS D=/NODIAGNOSTICSCreates a file containing compiler diagnostic messages. The default file type 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=/NODISTINGUISH_NESTED_ENUMSCauses 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=option
(D=LITTLE)Controls whether big or little endian ordering of bytes is carried out in character constants. The options are BIG or LITTLE.
/ERROR_LIMIT[=n]
/NOERROR_LIMIT D=/ERROR_LIMIT=30Specifies the number of diagnostic messages with a severity of "error" that are acceptable during program compilation. Compilation terminates when the limit (n) is exceeded. The /NOERROR_LIMIT qualifier specifies that there is no limit on error messages.
/EXCEPTIONS[=[NO]CLEANUP]
/NOEXCEPTIONS D=/EXCEPTIONSControls 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.
/NOEXCEPTIONS disables C++ exceptions as follows:
1. The compiler diagnoses 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.
/EXTERN_MODEL=(option)
(D=RELAXED_REFDEF)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 will then act as if the program begins with this line:
#pragma extern_model strict_refdef "MYDATA" noshr
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
STRICT_REFDEF=["NAME"]
GLOBALVALUE
/FLOAT[=option]
(D=G_FLOAT)Controls the format of floating-point variables. If you do not specify /FLOAT or /G_FLOAT on the command line, double variables are represented in G_floating format.
Options:
D_FLOAT Double variables are represented in D-float format.
G_FLOAT Double variables are represented in G-float format.
IEEE_FLOAT Single and double variables are represented in IEEE_floating format.
/G_FLOAT
/NOG_FLOAT D=/G_FLOATControls the format of floating-point variables. The default is /G_FLOAT, which means double variables are represented in G-float format.
/GRANULARITY=option
D=QUADWORDSpecifies how much memory can be "cached" in registers for memory references, by the combination of the compiler and the underlying system. The options are: BYTE, LONGWORD, and QUADWORD. The default is /GRANULARITY=QUADWORD.
/IEEE_MODE=option
D=/IEEE_MODE=FASTSelects the IEEE floating-point mode to be used if /FLOAT=IEEE_FLOAT is specified. You can select from the following options:
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 UNDERFLOW_TO_ZERO, except that denorms are generated.
INEXACT Same as DENORM_RESULTS, except that inexact values are trapped. This is the slowest mode.
The default is /IEEE_MODE=FAST.
/IMPLICIT_INCLUDE
/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=(pathname [,...])
/NOINCLUDE_DIRECTORY D=/NOINCLUDE_DIRECTORYProvides 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 /INCLUDE_DIRECTORY qualifier provides similar functionality 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 only search 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:
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"
type required: The file type must be a part of the module name. Examples:
#include "foo.h" Module name "FOO.H" #include "foo" Module name "FOO." #include "foo." Module name "FOO."
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):
#include "foo"
- For each library specified via the /LIBRARY qualifier: - Look for "FOO." - Look for "FOO" - Look for "FOO." in CXX$TEXT_LIBRARY - Look for "FOO" in CXX$TEXT_LIBRARY - Look for "FOO." in CXXL$ANSI_DEF (Do not look for "FOO" because the type is required as part of the module name) - Look for "FOO" in DECC$RTL_DEF (not "FOO." because the type must not be part of the module name) - Look for "FOO" in SYS$STARLET_C (not "FOO." because the type must not be part of the module name)
#include "foo.h"
- For each library specified via the /LIBRARY qualifier: - Look for "FOO.H" - Look for "FOO" - Look for "FOO.H" in CXX$TEXT_LIBRARY - Look for "FOO" in CXX$TEXT_LIBRARY - Look for "FOO.H" in CXXL$ANSI_DEF (Do not look for "FOO" because the type is required as part of the module name) - Look for "FOO" in DECC$RTL_DEF (not "FOO.H" because the type must not be part of the module name) - Look for "FOO" in SYS$STARLET_C (not "FOO.H" because the type must not be part of the module name)
9. If neither CXX$LIBRARY_INCLUDE nor CXX$SYSTEM_INCLUDE is defined as a logical name, then search SYS$LIBRARY:.HXX.
/INSTRUCTION_SET=[NO]FLOATING_POINT
/INSTRUCTION_SET=FLOATING_POINT D=/INSTRUCTION_SET=FLOATING_POINTThe /INSTRUCTION_SET=NOFLOATING_POINT qualifier suppresses the generation of floating-point instructions for integer operations.
/L_DOUBLE_SIZE=option
D=/L_DOUBLE_SIZE=128Determines 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 default is /L_DOUBLE_SIZE=128.
/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+APPLIC
/LINE_DIRECTIVES
/NOLINE_DIRECTIVES D=/LINE_DIRECTIVESSpecifies whether #line directives appear in preprocess output files.
/LIST[=file-spec] (Batch default)
/NOLIST (Interactive default)Controls whether a listing file is produced. The default output file type is .LIS.
/MACHINE_CODE
/NOMACHINE_CODE D=/NOMACHINE_CODEControls 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.
/MEMBER_ALIGNMENT
/NOMEMBER_ALIGNMENT D=/MEMBER_ALIGNMENTDirects 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).
Note that the default is /MEMBER_ALIGNMENT. This is different from the OpenVMS VAX default, which is to byte align structure members.
/MMS_DEPENDENCIES[:options]
/NOMMS_DEPENDENCIES D=/NOMMS_DEPENDENCIESInstructs the compiler to produce a dependency file, which has the following format:
object_filename: source_filename object_filename: full_path_to_first_include_file object_filename: full_path_to_second_include_file
Options are as follows:
FILE[=output file] specifies where to save the dependency file. The default file type is .MMS. Otherwise, this qualifier uses the same procedure as /OBJECT and /LIST for determining the name of the output file.
[NO]SYSTEM_INCLUDE_FILES specifies whether to include dependency information about system include files. By default, /MMS_DEPENDENCIES includes this information.
/NAMES=(option1,option2)
/NAMES=(UPPERCASE,TRUNCATED) D=/NAMES=(UPPERCASE,TRUNCATED)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=LOWERCASE causes all external names to be converted to lowercase. /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.
/NESTED_INCLUDE_DIRECTORY[=OPTION]
/NESTED_INCLUDE_DIRECTORY=INCLUDE_FILE D=/NESTED_INCLUDE_DIRECTORY=INCLUDE_FILEControls the directories that the compiler searches when looking for nested include files that are included using the quoted form of the #include preprocessor directive.
The options are:
PRIMARY_FILE Directs the compiler to first search the directory containing the top level source file for any nested include files.
INCLUDE_FILE Directs the compiler to first search the directory of the source file containing the #include directive.
NONE Directs the compiler to skip the first step of processing #include "filename.h" directives. Instead the compiler begins by looking for the included file in the directories specified by /INCLUDE_DIRECTORY.
For more information on the search order for included files, see the /INCLUDE_DIRECTORY qualifier.
/OBJECT[=file-spec]
/NOOBJECT D=/OBJECT[=file-spec]Controls whether the compiler produces an output object module. The default output file type is .OBJ.
/OPTIMIZE[=option]
/NOOPTIMIZE D=/OPTIMIZE[=option]Controls the level of code optimization that the compiler performs. /OPTIMIZE has the following options:
LEVEL=n Selects the level of optimization. Specify an integer from 0 (no optimization) to 4 (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 of 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 aggressive 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.
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 s provided, the code should run, but potentially at very significantly reduced speed, on pre-EV56 processors.
The options are: GENERIC (tune appropriate to all architectures), HOST (tune appropriate to the machine compiling the code), EV4 (tune for the 21064, 21064A, 21066, and 21068), and EV5 (tune for the 21164). /OPTIMIZE=TUNE defaults to /OPTIMIZE=TUNE=GENERIC.
[NO]INTRINSICS Controls whether or not 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 handles as intrinsics are:
Main Group - ANSI:
abs atanl atan2l ceill cosl floorf memcpy sinf atan atan2 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 together with /OPTIMIZE=LEVEL=n and some other qualifiers to determine how intrinsics are handled:
o 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.
o If the optimization level is 4 or higher, intrinsic code is generated.
o 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.
/PREFIX_LIBRARY_ENTRIES =(option,...)
/NOPREFIX_LIBRARY_ENTRIES D=/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIESControls 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:
EXCEPT = (NAME,...) The names specified are not prefixed
ALL_ENTRIES All C++ names are prefixed
ANSI_C89_ENTRIES Only ANSI C library names are prefixed
RTL = NAME References to the DEC C RTL, indicated by NAME, are generated. NAME must be 1017 characters or fewer.
If you want no names prefixed, specify /NOPREFIX_LIBRARY_ENTRIES. The default is /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES.
/PREPROCESS_ONLY[=file-spec]
/NOPREPROCESS_ONLY D=/NOPREPROCESS_ONLYCauses 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 is .IXX.
/PSECT_MODEL
/PSECT_MODEL=MULTILANGUAGE /PSECT_MODEL=NOMULTILANGUAGE D=/PSECT_MODEL=NOMULTILANGUAGEControls whether the compiler allocates the size of overlaid psects so as to ensure compatibility when the psect is shared by code created by other DEC 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 switch is /ALIGN=COMMON=[NO]MULTILANGUAGE.
The default is /PSECT=NOMULTILANGUAGE, which should be sufficient for most applications.
/QUIET
/NOQUIETReport 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[=option]
/REENTRANCY=TOLERANT D=/REENTRANCY=TOLERANTControls the type of reentrancy that reentrant DEC C Run-Time Library (RTL) routines will exhibit.
See also the DECC$SET_REENTRANCY RTL routine.
You can specify one of the following options:
AST Uses the __TESTBITSSI builtin 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 only be used 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 DEC C RTL.
TOLERANT Uses the __TESTBITSSI builtin 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 also the default reentrancy type.
/REPOSITORY=(PATHNAME [,...])
D=/REPOSITORY=[.CXX_REPOSITORY]Specifies a repository that C++ will use 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=option
Lets you select a IEEE rounding mode, if /FLOAT=IEEE_MODE is specified. The options are as follows:
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 /FLOAT=G_FLOAT or /FLOAT=D_FLOAT is specified, then rounding defaults to /ROUNDING_MODE=NEAREST, with no other choice of rounding mode.
/RTTI
/NORTTI D=/RTTIEnables 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.
Note that specifying /NORTTI does not disable exception handling.
/SHARE_GLOBALS
/NOSHARE_GLOBALS D=/NOSHARE_GLOBALSControls 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 impact:
o 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.
o The /NOSHARE_GLOBALS default makes building shareable libraries easier.
/SHOW=[(option,...)]
D=(HEADER,SOURCE)Used with the /LIST qualifier to set or cancel specific listing options. You can select the following options:
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=[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:
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.
ARM Minimize source changes when compiling programs developed using Version 5.n.
CFRONT Allow language constructs supported by the CFRONT translator.
MS Allow language constructs supported by the Visual C++ compiler.
STRICT_ANSI Enforce the ANSI standard strictly but permit some ANSI violations that should be errors to be warnings. To force ANSI violations to be issued with Error instead of Warning severity, use /WARNINGS=ANSI_ERRORS in addition to /STANDARD=STRICT_ANSI.
/TEMPLATE_DEFINE=(option,...)
/NOTEMPLATE_DEFINEControls compiler behavior pertaining to the instantiation of C++ templates. You can select the following options:
[NO]AUTOMATIC Directs C++ to turn on or off automatic instantiation of C++ templates. The default is /TEMPLATE_DEFINE=AUTOMATIC.
[NO]ALL Instantiate all function template entities declared or referenced in the compilation unit, including typedefs. For each fully instantiated template class, all its member functions and static data members are instantiated even if they were not used. Nonmember template functions are instantiated even if the only reference was a declaration. Instantiations are created with external linkage. Overrides /REPOSITORY at compile time. Instantiations are placed in the user's object file. The template definition must be present before the point of each instantiation in the source file. The default is /TEMPLATE_DEFINE=NOALL.
[NO]ALL_REPOSITORY Instantiate all templates declared or used in the source program and put the object code generated as separate object files in the repository. Instantiations caused by manual instantiation directives are also put in the repository. This is similar to /TEMPLATE_DEFINE=ALL except that explicit instantiations are also put in the repository, rather than than an external symbol being put in the main object file. This option is useful for creating a pre-instantiation library. Note that compile time instantiation is generally not practical for larger applications. With /TEMPLATE_DEFINE=ALL, template entities are instantiated with external linkage, which results in multiply defined symbol errors at link time if the same template entities are instantiated in different modules.
[NO]IMPLICIT_LOCAL Generate explicit template instantiations as external symbols in the user's object file, but generate any template instantiations that are used with internal linkage. Similar to /TEMPLATE_DEFINE=LOCAL), except that manual instantiations in the source file are linked externally. This is useful for build systems that require explicit control of the template instantiation mechanism. Implicitly generated template instantiations with internal linkage can produce larger object files.
[NO]LOCAL Instantiate only the template entities that are used in this compilation, and force those entities to be local to this compilation. The default is /TEMPLATE_DEFINE=NOLOCAL.
[NO]USED Instantiate only the template entities that are used in this compilation. The template entities are instantiated with external linkage. The default is /TEMPLATE_DEFINE=NOUSED.
[NO]USED_REPOSITORY Like /template_define=all_repository), but instantiates only templates used by the compilation. The explicit instantiations are also put into the repository as separate object files.
[NO]PRAGMA Determines whether to C++ ignores #pragma define_template directives encountered during the compilation. This option lets you quickly switch to automatic instantiation without having to remove all the pragma directives from your program's code base.The default is /TEMPLATE_DEFINE=PRAGMA, which enables #pragma define_template.
DEFINITION_FILE_TYPE= Specifies a string that contains a list of file types that are valid for template definition files. Items in the list must be separated by commas and preceded by a period. A type is not allowed to exceed the OpenVMS limit of 31 characters. This option is applicable only when automatic instantiation has been specified. The default is /TEMPLATE_DEFINE=DEF=".CXX,.C,.CC,.CPP".
[NO]VERBOSE Turns on verbose or verify mode to display each phase of instantiation as it occurs. During the compilation phase, informational level diagnostics are generated to indicate which templates are automatically being instantiated into the repository. This option is useful as a debugging aid. The default is /TEMPLATE_DEFINE=NOVERBOSE.
TIMESTAMP Causes the compiler to create a timestamp file named TIMESTAMP. in the repository. Thereafter, instantiations are added or regenerated only if needed; that is, if they do not alreay exist, or if existing ones are older than the timestamp.
To preserve compatability with releases prior to Version 5.3, the behavior is unchanged if you specify /NOTEMPLATE_DEFINE or /TEMPLATE_DEFINE without options. Thus:
Qualifier Default for Options
/TEMPLATE_DEFINE /TEMPLATE_DEFINE=(NOAUTO,ALL,NOLOCAL,NOUSED,PRAGMA, NOVERBOSE) /NOTEMPLATE_DEFINE /TEMPLATE_DEFINE=(NOAUTO,NOALL,NOLOCAL,NOUSED,PRAGMA, NOVERBOSE)
If you do not specify either /TEMPLATE_DEFINE or /NOTEMPLATE_DEFINE, the default is to perform automatic instantiation. Thus:
Qualifier Default for Options
None specified /TEMPLATE_DEFINE=(AUTO,NOALL,NOLOCAL,NOUSED,PRAGMA - DEF_FILE=".CXX,.C,.CC,.CPP",NOVERBOSE)
If you specify /TEMPLATE_DEFINE with some options, the defaults for non-specified option are the same as previously listed. For example, if you specify /TEMPLATE_DEFINE=DEF_FILE=".CXX", the options in effect are:
/TEMPLATE_DEFINE= - (AUTO,NOALL,NOLOCAL,NOUSED,PRAGMA,DEF_FILE=".CXX")
/UNDEFINE=(identifier[,...])
/NOUNDEFINE() D=/NOUNDEFINEPerforms 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.
The default is /NOUNDEFINE.
/UNSIGNED_CHAR
/NOUNSIGNED_CHAR D=/NOUNSIGNED_CHARCauses all plain char declarations to have the same representation and set of values as signed char declarations. The default is /NOUNSIGNED_CHAR.
/USING_STD
/NOUSING_STD D=/USING_STDControls 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=MS, or /STANDARD=ANSI.
/NOUSING_STD turns implicit using namespace std off; this is the default when compiling /STANDARD=STRICT_ANSI.
/VERSION
/NOVERSION D=/NOVERSIONCauses the compiler to identify (print out) its version and operating system. The listing file will also contain the compiler version.
/WARNINGS[=(option,...)]
/NOWARNINGS D=/WARNINGSControls the issuance 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.
INFORMATIONALS Turns on informationals.
ENABLE=ALL or Enable specific messages that normally would not (ident,...) be issued when using /QUIET. Enable messages disabled with /WARNINGS=DISABLE.
DISABLE=ALL or Disable the message. Can be used for any nonerror (ident,...) message specified by a message number or tag. Specify ALL to suppress all informationals and warnings.
INFORMATIONALS= Issue all specified messages as informationals. ALL or ALL can be specified, but applies only to discretionary (ident,...) errors. Also, enable informationals, which are disabled by default.
WARNINGS=ALL Issue all specified messages as warnings. ALL can be or (ident,...) specified, but applies only to discretionary errors.
WARNINGS= Issue error messages for all ANSI violations when in [NO]ANSI_ERRORS STRICT_ANSI mode. The default is /WARNINGS=NOANSI_ERRORS.
WARNINGS=[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 Issue all specified messages as errors. ALL can be (ident,...) specified, but applies only to discretionary errors.
/XREF[=file-spec]
/NOXREF D=/NOXREFControls 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.
Language_topics
C++ language topics
Additional Information on:
Release_Notes
The release notes for C++ are contained in the following files:SYS$HELP:CXX060.RELEASE_NOTES SYS$HELP:CXX060_RELEASE_NOTES.PS
You can type or print these files to read the release notes information.
Class_Library
To access help on the C++ Class Library, enter the following command at the $ prompt:$ HELP CXXL or access that HELP from your browser: Class_Library
Standard_Library
To access help on the C++ Standard Library, enter the following command at the $ prompt:$ HELP CXXLSTD or access that HELP from your browser: Standard_Library
Customer_feedback
You can send comments or suggestions regarding this help file, or any C++ documentation, by electronic mail to the following Internet address: cxx_docs@zko.dec.comCXXLINK
To access help on the CXXLINK facility, enter the following command at the $ prompt:$ HELP CXXLINK or directly access that help from your browser: CXXLINK
CXXDEMANGLE
To access help on the CXXDEMANGLE facility, enter the following command at the $ prompt:$ HELP CXXDEMANGLE or directly access that help from your browser: CXXDEMANGLE
|