United States |
|
|
||
Appendix A
|
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.
/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).
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.
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,
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. |
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.
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.
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 .
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 /ERROR_LIMIT=30 , which specifies that compilation terminates after issuing 30 error messages.
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:
The /EXCEPTIONS qualifer defines the macro __EXCEPTIONS.
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.
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.) |
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 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 .
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. |
/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++.
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:
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:
For standard searches, the search order is 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
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]
#include "foo.h" | Module name "FOO" |
#include "foo" | Module name "FOO" |
#include "foo" | Module name "FOO" |
#include "foo.h" | Module name "FOO.H" |
#include "foo" | Module name "FOO." |
#include "foo" | Module name "FOO." |
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)
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)
#include "foo" |
- Look for "FOO."
- Look for "FOO"
Example 2
#include "foo.h" |
- Look for "FOO.H"
- Look for "FOO"
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.
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).
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. |
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.
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.
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.
Note that the /OBJECT qualifier has no impact on the output file of the /MMS_DEPENDENCIES qualifier.
/OPTIMIZE
Controls the level of code optimization that the compiler performs. The options are as follows:
/OPTIMIZE[=option]
/OPTIMIZE=(INLINE=AUTOMATIC,LEVEL=4,INTRINSICS,UNROLL=0,
TUNE=GENERIC) (D)
/NOOPTIMIZE
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
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.
/PENDING_INSTANTIATIONS[=n]
/PENDING_INSTANTIATIONS=64(D)/POINTER_SIZE
Controls whether pointer-size features are enabled, and whether pointers are 32 bits or 64 bits long.
/POINTER_SIZE=option
/NOPOINTER_SIZE (D)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
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).
/PREFIX_LIBRARY_ENTRIES=(option,...)
/NOPREFIX_LIBRARY_ENTRIES
/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES (D)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
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.
/PREPROCESS_ONLY[=filename]
/NOPREPROCESS_ONLY (D)/PSECT_MODEL
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.
/PSECT_MODEL=MULTILANGUAGE
/PSECT_MODEL=NOMULTILANGUAGE (D)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
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 .
/QUIET
/NOQUIET (D)Use /WARNINGS=ENABLE to enable specific messages normally disabled with /QUIET .
/REENTRANCY
Controls the type of reentrancy that reentrant Compaq C RTL routines exhibit. (See also the DECC$SET_REENTRANCY RTL routine.)
/REENTRANCY=option
/REENTRANCY=TOLERANT (D)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
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.
/REPOSITORY=(PATHNAME [,...])
/REPOSITORY=[.CXX_REPOSITORY] (D)/ROUNDING_MODE
Lets you select an IEEE rounding mode if /FLOAT=IEEE_FLOAT is specified. The options are as follows:
/ROUNDING_MODE=option
/ROUNDING_MODE=NEAREST (D)
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
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.
/RTTI (D)
/NORTTINote that specifying /NORTTI does not disable exception handling.
/SHARE_GLOBALS
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 .
/SHARE_GLOBALS
/NOSHARE_GLOBALS (D)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
Used with the /LIST qualifier to set or cancel specific listing options. You can select the following options:
/SHOW=(option[,...])
/SHOW=(SOURCE,HEADER) (D)
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
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:
/STANDARD=(option)For more information on the effect of the /STANDARD qualifier on Compaq C++ compile-time error checking, Section 4.1.
/TEMPLATE_DEFINE
Controls compiler behavior pertaining to the instantiation of C++ templates. See Chapter 5. for details on how to instantiate templates using this qualifier.
/TEMPLATE_DEFINE=(option,...)
/NOTEMPLATE_DEFINE/UNDEFINE
Performs the same function as the #undefine preprocessor directive: it cancels a macro definition.
/UNDEFINE=(identifier[,...])
/NOUNDEFINE (D)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
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.
/UNSIGNED_CHAR
/NOUNSIGNED_CHAR (D)/USING_STD
Controls whether standard library header files are processed as though the compiled code were written as follows:
/USING_STD
/NOUSING_STD (D)
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
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.
/VERSION
/NOVERSION (D)/WARNINGS
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.
/WARNINGS[=(option[,...])]
/WARNINGS (D)
/NOWARNINGSIndicated 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
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.
/XREF[=file-spec]
/NOXREF (D)
Previous | Next | Contents | Index |
privacy statement and legal notices |