HP C for OpenVMS
HP C for OpenVMS
— A Microsoft compatibility mode that interprets
source programs according to certain language
rules followed by the C compiler provided with the
Microsoft Visual C++ compiler product.
In addition, just the features specified by Addendum 1
to the ISO C standard adopted by ISO in November of
1994 (digraphs and the _ _STDC_VERSION_ _ prede-
fined macro) can be added to each of these dialects
except for VAX C mode.
• Data types for numeric, nonnumeric, and systems
programming:
— C99 Universal Character Names (UCNs) are ac-
cepted in identifiers, string literals, and character
constants (and their wide variations) (Not Open-
VMS VAX).
— HP C supports 8, 16, and 32-bit signed and un-
signed integers. HP C OpenVMS Alpha and
OpenVMS I64 also supports 64-bit signed and un-
signed integers.
— HP C supports an 8-bit _Bool data type for C99.
— HP C supports 32-bit float and 64-bit double
floating-point data types. The VAX floating-point
formats include D-float and G-float and are user
selectable.
— HP C OpenVMS Alpha and I64 also supports
IEEE floating-point formats in 32-bit single, 64-
bit double, and 128-bit quad-precision double-
extended representations. The C language type
"long double" normally is represented in 128-bit
quad precision IEEE format on these platforms,
although there is a compile-time option that allows
the user to specify that it should use the same rep-
resentation as type "double" (which is the format
used on OpenVMS VAX).
— C99 constants for specific values of Infinity and
NaN are supported when using/float=ieee (Not
OpenVMS VAX).
— HP C OpenVMS Alpha and OpenVMS I64 sup-
ports the C99 _Complex keyword for specifying
three types that represent values in the complex
plane, based on Cartesian coordinates of type
float, double, or long double, respectively, except
that D_float representation is not supported for _
Complex types. Run-time library support for C99
mathematical functions operating on these types
is available in OpenVMS Alpha V7.3-1 and sub-
sequent versions.
— HP C supports passing numeric constants by ref-
erence in function calls.
— HP C supports the multibyte and wide-character
types and features of XPG4, with the locale sup-
port available in OpenVMS V6.4 and subsequent
versions.
— HP C OpenVMS Alpha and OpenVMS I64, on
OpenVMS Version 7.0 and later, supports user-
controlled features to specify the use of 64-bit
pointers that allow applications to exploit the in-
creased address space capabilities of the Alpha
and I64 architectures and the OpenVMS Alpha
Version 7.0 services. These features include
command-line qualifiers, #pragma directives, and
run-time library specifications that allow the pro-
grammer to allocate and access data at run time
that is to be beyond the range of addressing af-
forded by 32-bit pointers. By default, programs
compiled by earlier versions of the compiler or on
earlier versions of OpenVMS continue to behave
as before, strictly within 32-bit address space.
Explicit use of the new compiler features allow
such programs to be extended to exploit the ex-
tended address space with minimal changes to
the source code.
• Storage allocation using:
— Reserved words (globalref, globaldef, and global-
value) for sharing data among program modules
— Reserved words (readonly, noshare, and psect
name specification) for control of data attributes
and data placement
— Reserved words (_align and _unaligned) for spec-
ifying the alignment boundaries of data objects
— Pragmas to control extern models and structure
member alignment and base structure alignment
• Option for running only the preprocessor phase of
compilation
• Option for generating include-file dependency infor-
mation to aid in construction of files for the HP
Module Management System
• Pragmas to control compiler options
• The C99_Pragma operator, which effectively allows
pragma directives to be produced by macro expan-
sion (not OpenVMS VAX).
• Compilation options allowing a choice between fast
turnaround and optimization across compilation units
• Option to generate a file of prototype-style function
declarations suitable for use in a header file from
the function definitions (both prototype-style and old-
style) contained in a source file.
• Enhanced diagnostic message controls with the
command-line qualifier /WARNINGS, including the
following features:
— specify whether a message is issued only once
per compilation, or at each occurrence
— specify severity of any message with a default
severity of information or warning
2