[an error occurred while processing this directive]

HP OpenVMS Systems

C Programming Language
Content starts here Compaq C V6.4 for OpenVMS VAX Release Notes

Compaq C V6.4 for OpenVMS VAX Release Notes


© 2001 Compaq Computer Corporation.

COMPAQ, the Compaq logo, VAX, Alpha, VMS, and OpenVMS are registered in the U.S. Patent and Trademark Office. Tru64 is a trademark of Compaq Information Technologies Group, L.P. in the United States and other countries. Microsoft and Visual C++ are trademarks of Microsoft Corporation. UNIX is a trademark of The Open Group in the United States and other countries. All other product names mentioned herein may be trademarks of their respective companies.

Confidential computer software. Valid license from Compaq required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided as is without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.

Contents

1 Product name change: DEC C -> Compaq C

Note that the change in the product name from DEC C to Compaq C reflects only the acquisiton of the corporation, and meeting the new requirements for product branding. The technical content of the compiler has not changed, and in particular the use of the string DEC or DECC in the software itself (e.g. names of predefined macros, command line qualifiers, filenames, symbol prefixes, etc) has not changed.

We have tried to use the name Compaq C when referring to the new version, or when making general references to the product that might encompass both old and new versions. We try to use the name DEC C only where an older version is specifically being designated or where the use involves software identifiers or strings that are not changing. There are bound to be instances that inadvertently use the "wrong" name. The important thing to know is that from a technical point of view, this is a new version of the DEC C compiler and the name change does not signify a change in technology that could introduce incompatibilites with previous versions of DEC C.

Similarly for DEC C++, which is being renamed to Compaq C++ in V5.7 for OpenVMS VAX.

2 News for Application Developers

There is a new product called "OpenVMS Enterprise Toolkit for Visual Studio" that supports remote development for OpenVMS using a Windows/NT desktop running a Visual Studio interface that is now shipping. See http://h71000.www7.hp.com/commercial/et/et_index.html for more information.

3 Introduction

This document contains the release notes for Compaq C V6.4 for OpenVMS VAX. A significant capability provided by this compiler kit is the ability to build applications using new Compaq C Runtime Library features, and deliver those applications on earlier versions of OpenVMS when necessary. This capability is provided by two additonal files installed by this kit in SYS$LIBRARY: DECC$CRTL.EXE, and DECC$CRTL.OLB. The file SYS$LIBRARY:DECC$CRTL.README provides important detailed information on how such applications can be built. The technique described there requires recompilation using both the compiler and the CRTL header files provided with Compaq C V6.4 before relinking.

Also note that most of the Compaq C documentation is now being provided in html format, including help and release notes, as well as all of the Compaq C manuals. The URL to access the online help with a local browser is given at the start of the "$ help cc/decc" command. For additional information about the OpenVMS VAX version of Compaq C, see also:

  • The Compaq C User's Guide for OpenVMS Systems
  • The Compaq C Migration Guide for OpenVMS VAX Systems
  • Enter the command HELP CC/DECC

For additional information about the Compaq C language and its supported library routines, see also:

  • The Compaq C Language Reference Manual
  • The Compaq C Run-Time Library Reference Manual for OpenVMS Systems

The Compaq C media contains three VMSINSTAL kits; in order: AACRT060.A CCnnn.A, CCnnn.B.

AACRT060 is the Compaq C/C++ Run-Time Components for OpenVMS VAX V6.0 kit. It includes image files and libraries for the Compaq C RTL, Compaq C++ Class Library and DECthreads. These files are updated versions of the binaries provided with V6.0 of OpenVMS VAX. Additional files useful for building applications which use both the VAX C RTL and Compaq C RTL are also included. This kit must not be installed on V6.1 of OpenVMS VAX systems or later. Starting with V6.1 of OpenVMS VAX, all of the components and functionality contained on the AACRT060 kit were provided with the base operating system. Please see the Compaq C/C++ for OpenVMS VAX Run-Time Components Reference and Installation Manual in that kit's documentation for installation and usage information, and the following section regarding redistribution of libraries.

The CCnnn.A and CCnnn.B savesets contain the compiler and documentation kits, where the nnn encodes the compiler version number.

4 Redistribution of Run-Time Libraries

This section describes how developers who need to redistribute run-time library components to their users' systems are required to do so. The Compaq C Version 6.2 kit contains two run-time library components that you may need to redistribute:

  • Compaq C/C++ Run-Time Components for OpenVMS VAX V6.0 (AACRT060.A)
  • Compaq C Run-Time Object Library (DECC$CRTL.OLB)

Redistribution of other components on the Compaq C Version 6.2 kit is prohibited. The redistribution rights set forth in the Software Product Description do not apply to the DECC$CRTL.EXE or DECC$CRTL.README files distributed with this kit.

4.1 Redistribution of the AACRT060.A Run-Time Components Kit

The Compaq C/C++ Run-Time Components kit has been engineered to allow for redistribution with any application that uses one or more of these components. Redistributing the Compaq C/C++ Run-Time Components kit requires that the entire kit and its documentation be shipped to the remote site receiving any such application. See the Compaq C/C++ Run-Time Components for OpenVMS VAX Reference and Installation Guide for detailed installation and redistribution instructions. Note that applications targeted to V6.1 and later versions of OpenVMS have no need of this kit.

4.2 Redistribution of the DECC$CRTL.OLB Object Library

Redistribution of this library is only required by those applications that need the features supplied by the library and need to be linked during or after installation on an end user target system. If you link your application against this library and ship either a shareable or executable image to your customers, then redistribution of the object library is not necessary. The linking process of your application causes those library modules to be incorporated into your resultant image.

There are two options that can be used to redistribute the DECC$CRTL.OLB object library. The options are based on whether or not the library is needed after the installation is completed.

The first option is for applications that link during installation, but have no need for the object library once installation is completed. For that set of developers, we recommend placing DECC$CRTL.OLB on your kit, but to link using the copy in VMI$KWD and not issue a PROVIDE_FILE option which would move this file onto the system. In other words, the object library resides only on your kit, is used during installation to link your application, but is not placed onto the end user system.

The second option is for applications that do need the object library after installation is completed. For this class of applications, the object library should be placed in a product-specific location on the target system and not in SYS$LIBRARY. The contents of this object library must not be inserted into the SYS$LIBRARY:STARLET.OLB library.

5 Installation Notes

For additional information about installing the kit, and for the location of installed components of this product, refer to the Compaq C Installation Guide accompanying these release notes.

5.1 The startup procedure

After installing Compaq C for OpenVMS VAX on a cluster, you must invoke the command @SYS$STARTUP:CCXX$STARTUP.COM on each node of the cluster.

5.2 The CC command

If you have VAX C installed on your system, the installation procedure will ask if you want the CC command to default to VAX C or Compaq C. The default response is Compaq C. If you choose the default response and let CC invoke Compaq C instead of VAX C, you may find that:

  • Command files that expect CC to invoke VAX C may fail.
  • Other layered products that expect CC to invoke VAX C may fail during installation or IVP.
Typically, this occurs when the code being compiled depends upon features of VAX C that are not present in the default "relaxed ANSI" mode of Compaq C. For example, the code may not comply with the C standard. If you wish to have CC invoke Compaq C, you may want to inform users that they can define a global symbol:


    $ cc == "cc/vaxc"
that will allow their command procedures to continue to work.

So that users and other produces can determine the default for the CC command, Compaq C defines the logical DECC$CC_DEFAULT . This logical has the value /VAXC if CC invokes VAX C and the value /DECC if CC invokes Compaq C. This logical does not control the behavior of the CC command. That is determined at installation time.

5.3 The Compaq C/C++ Run Time Components kit

On versions of OpenVMS VAX prior to V6.1 only, Compaq C requires the previous installation of the Compaq C/C++ Run Time Components kit. The Compaq C compiler will not install if the Compaq C/C++ Run Time Components kit is not installed on such systems. See the Compaq C/C++ Run Time Components kit release notes for more information. On versions of OpenVMS VAX from V6.1 onward, the run time components needed by Compaq C are shipped as part of the OpenVMS distribution and the Compaq C/C++ Run Time Components kit must not be installed on those systems.

When installing or upgrading to OpenVMS V5.* on a system that has Compaq C installed on it, certain files will be superseded by old versions that are incompatible with the newer versions contained in the Compaq C/C++ Run-Time Components kit. Therefore, the AACRT kit should be reinstalled after any update of OpenVMS. It is not necessary to reinstall the AACRT kit after updating to OpenVMS V6.1. It is not necessary to reinstall the AACRT kit prior to future upgrades of Compaq C.

The AACRT060 kit provides a version of DECthreads for use on OpenVMS VAX V5.5-2 through OpenVMS VAX V6.0. This version of DECthreads cooperates with the Compaq C RTL. Some existing applications may not run correctly if they use both the new version of DECthreads and the OpenVMS V5.* versions of SYS$LIBRARY:VAXCRTL*.EXE. If you upgrade to VMS 6.1, the system versions of the DECthreads headers are newer than the version which ship on this kit. Therefore, you will need to reinstall Compaq C V6.4 so that the pre-6.1 DECthreads headers will be removed from DECC$RTLDEF.TLB.

You must not redistribute individual components contained in the AACRT kit. See Section 4 for information on redistributing run-time components.

Finally, note that the Compaq C RTL was substantially enhanced in versions 6.2 and 7.0 of OpenVMS VAX. Many new API's were added for XPG4 localization in V6.2, and for UNIX compatibility and to support the ISO C addendum in V7.0 of OpenVMS. These features and other RTL improvements incorporated with them are not available on pre-6.2 versions of OpenVMS. Since the Compaq C RTL is part of the OpenVMS operating system, to benefit from the continuing feature and performance enhancements in the Compaq C RTL it will generally be necessary to upgrade your version of OpenVMS. However, in cases where upgrading is not an option, it is possible to build Compaq C images that use some newer features of the Compaq C RTL that will run on earlier versions of the operating system that lack those RTL features. This involves special compilation, and linking against an object library as described in SYS$LIBRARY:DECC$CRTL.README.

5.4 Installing both Compaq C and VAX C

If you wish to use both VAX C V3.* and Compaq C on a system, you must install Compaq C after installing VAX C. Installing Compaq C modifies the CC command so that CC/DECC invokes the Compaq C compiler and CC/VAXC invokes the VAX C compiler. If you install VAX C after Compaq C, you will not be able to activate Compaq C with the CC command. If you do install VAX C after installing Compaq C, you must then reinstall Compaq C.

5.5 Installing both Compaq C and Compaq C++

If you wish to use both DEC C++ V1.3 (or higher, including Compaq C++ V5.7) for OpenVMS VAX and Compaq C V6.4 for OpenVMS VAX, you may install the C and C++ kits in either order. Beginning with DEC C V4.0 and DEC C++ V1.3, the two kit installation procedures were made to be compatible.

If you wish to use both Compaq C V6.4 for OpenVMS VAX and a version of DEC C++ for OpenVMS VAX prior to V1.3, you must install Compaq C after installing DEC C++.

For information on interactions between the DEC C and DEC C++ installations specific to V5.3, see Section 7.8 in these release notes.

6 Installing and Using Multiple Compiler Versions

Compaq C V6.4 provides initial support for installing and using multiple versions of the compiler on the same node.

During installation of V6.4, if a V6.0 or V6.2 version of the compiler is already installed, you will be given the opportunity to preserve that compiler rather than overwrite it. If you choose to preserve the currently-installed compiler, you will then be given an opportunity to keep the currently-installed compiler as the system default and install the new compiler as an alternate. By default, preserving the currently installed system compiler is performed by making it an alternate compiler, and installing the new compiler as the system default.

The choice to use an alternate compiler instead of the installed system compiler can be made by users, by running a command procedure that changes the behavior of the cc command for the process that invokes it.

6.1 Displaying and selecting the compiler version

This kit provides two command procedures to display and control which Compaq C compiler is used by a process.

  • SYS$SYSTEM:DECC$SHOW_VERSIONS.COM
    This procedure displays what Compaq C compilers are available on the system, together with their version numbers. It also displays which compiler is the default for the current process. The procedure takes an optional version number argument. An example:


    $ @sys$system:decc$show_versions.com
    
    The following  Compaq C compiler(s) are available in SYS$SYSTEM:
    
    Filename                      Version
    ---------------------------------------
    DECC$COMPILER.EXE             V6.4-005
    DECC$COMPILER_T06_04-001.EXE  T6.4-001
    DECC$COMPILER_V06_00-001.EXE  V6.0-001    Process Default
    DECC$COMPILER_V06_02-003.EXE  V6.2-003
    
    $ @sys$system:decc$show_versions.com V6.0
    
    The following  Compaq C compiler(s) are available in SYS$SYSTEM:
    
    Filename                      Version
    ---------------------------------------
    DECC$COMPILER_V06_00-001.EXE  V6.0-001    Process Default
    
    

  • SYS$SYSTEM:DECC$SET_VERSION.COM
    This procedure sets up process logicals that point to an alternate Compaq C compiler in sys$system, or it removes the process logicals to revert back to using the default system compiler. The procedure takes one argument, a version number or "SYSTEM" (if no arguments are specified you will be prompted). The SYSTEM argument selects the installed system compiler, which is the one displayed with the filename DECC$COMPILER.EXE in the output of decc$show_versions.com. Alternate compilers are shown in that output with their version number appended to the simple filename. For example, the V6.2-003 compiler is given the name: DECC$COMPILER_V06_02-003.EXE .
    To select a compiler, pass a full ident string or enough of the ident string to be unique. For example: to select the V6.2-003 compiler from our list above we can pass V6.2-003 or V6.2 to the decc$set_version.com routine. However to select a 6.4 compiler a full ident string would be required to distinguish between the T6.4-001 and the V6.4-005 compiler.


    
    @sys$system:decc$set_version.com V6.2-003
    
    @sho logical DECC$*
    (LNM$PROCESS_TABLE)
      "DECC$COMPILER" =
        "SYS$COMMON:[SYSEXE]DECC$COMPILER_V06_02-003.EXE"
      "DECC$MSG_SHR" =
        "SYS$COMMON:[SYSMSG]DECC$MSG_SHR_V06_02-003.EXE"
    
    $ @decc$set_version.com 6.4
    
    The following V6.4 Compaq C compiler(s) are available in SYS$SYSTEM:
    
    Filename                      Version
    ---------------------------------------
    DECC$COMPILER.EXE             V6.4-005
    DECC$COMPILER_T06_04-001.EXE  T6.4-001
    
    Ambiguous version number, please be specify a full version number, ex: V6.4-005
    Version number : V6.4-005
    
    $ sho logical DECC$COMPILER
       "DECC$COMPILER" = "SYS$COMMON:[SYSEXE]DECC$COMPILER_V06_04-005.EXE" (LNM$PROCESS_TABLE)
    $ sho logical DECC$msg_shr
       "DECC$MSG_SHR" = "SYS$COMMON:[SYSMSG]DECC$MSG_SHR_V06_04-005.EXE" (LNM$PROCESS_TABLE)
    
    

    When this procedure is run in a process, subsequent cc commands invoke the selected compiler version (until the procedure is run again). The process-level logicals used do not affect other processes or users on the system.

6.2 Side effects and restrictions on multiple versions

When you install this kit, it provides the latest CLD file (to establish DCL tables), the latest decc$rtldef.tlb, and the latest documentation, even if you select the option of having the new compiler as an alternate compiler. The new CLD file and the new decc$rtldef.tlb do not adversely impact a preexisting V6-based compiler because they are upwardly compatible. HOWEVER, if you attempt to use a new compiler option with an older compiler, you will no longer get a DCL error that the option is not supported. Instead, the option will be reported by VCG. For example, note that before installation of V6.4, the following would have produced "%DCL-W-IVQUAL, unrecognized qualifier ...."


    $@sys$system:decc$set_version.com 6.0
    $cc /stand=c99 foo.c  ! /standard=c99 new in 6.2
    $ %VCG-F-INVCMDVAL, "C99" is an invalid command qualifier value.

And because you must have the newest CLD file and header files in order to use the newest compiler, if you run an older installation procedure to put an older compiler back on your system, you must then re-run the 6.4 installation to get the newest files.

Note that there are two logical names involved in establishing the compiler version - one for the compiler image and one for its message file. This version of the compiler will issue a diagnostic if it is invoked with the wrong version of the message file - but prevous versions of the compiler do not detect this situation. If you find that an older version of the compiler is issuing diagnostics that don't make sense for the code construct they're attached to, or if the message text is missing and only a message number is issued, check that you have matched versions of the files designated by the two logicals using the command "$ show logical decc$compiler*". The response should show matching version-numbered files as in the example selecting the 6.2 compiler. Or if you are using the system compiler, the response should be "%SHOW-S-NOTRAN, no translation for logical name DECC$COMPILER*".

6.3 Installation Procedure Changes

When you install Compaq C V6.4 on a system that already has a 6.0 or higher compiler installed, you will be given the opportunity to preserve the currently-installed system compiler. To do this, answer yes to the following question (the xxx will be replaced by the full version number of the existing system compiler):


"Should the existing xxx system compiler be preserved [NO]:"

If you answer no, the installation will procede in the traditional manner, overwriting the currently-installed system compiler.

If you answer yes, you will be asked an additional question. To get the traditional behavior of installing the kit compiler as the system default, answer NO to the question:


"Should this xxx system compiler remain the
                        default when cc is typed [NO]:"

Since you have previoiusly asked to preserve the existing system compiler, that compiler is made an alternate compiler before installing the new system compiler from the kit. If you answer yes to the question, the kit compiler will be installed as an alternate compiler with a name based on its ident and the existing system default compiler will remain the default.

6.4 Sample installation fragment


  Compaq C V6.4 for OpenVMS VAX Systems
!
!  Copyright 2001 Compaq Computer Corporation
!
!  Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office.
!
!  Confidential computer software. Valid license from Compaq required for
!  possession, use or copying. Consistent with FAR 12.211 and 12.212,
!  Commercial Computer Software, Computer Software Documentation, and
!  Technical Data for Commercial Items are licensed to the U.S. Government
!  under vendor's standard commercial license.
!

    A C V6.0-001 compiler was found on your system.
    Type YES to keep this compiler on your system either as
    the default system compiler, or as an alternate compiler.
    Type NO to supersede C V6.0-001.

* Should the existing V6.0-001 system
     compiler be preserved [NO]: yes

    Type NO to have the compiler on this kit become the default system compiler
    and to have the currently installed compiler saved as an alternate compiler.
    Type YES to keep the current system compiler as the default compiler,
    and to have the compiler on this kit available as an alternate compiler.
    Alternate compilers can be invoked with the cc command after invoking
    sys$system:decc$set_version.com passing a version_number.

* Should this V6.0-001 system compiler remain
     the default when cc is typed [NO]: yes


        Product:      C
        Producer:     DEC
        Version:      6.4
        Release Date: 05-JAN-2001


* Does this product have an authorization key registered and loaded? yes

....

    Your OpenVMS system will now be modified to include the
    following new and modified files:

    [SYSEXE]DECC$COMPILER_V06_04-005.EXE     [new]
    [SYSMSG]DECC$MSG_SHR_V06_04-005.EXE      [new]
    [SYSHLP]HELPLIB.HLP                   [modified]
    [SYSHLP.CC$VAX_HELP_064]*.*           [new]
    [SYSHLP]CC064.RELEASE_NOTES           [new]
    [SYSLIB]DCLTABLES.EXE                 [modified]
    [SYSLIB]DECC$RTLDEF.TLB               [new]
    [DECC$LIB.REFERENCE.SYS$STARLET_C]*.H [new]
    [DECC$LIB.REFERENCE.DECC$RTLDEF]*.H   [new]
    [SYSLIB]DECC$OLB.EXE                  [new]
    [SYSLIB]DECC$OLB.README               [new]
    [SYSLIB]DECC$OLB.OLB                  [new]
    [SYS$STARTUP]CCXX$STARTUP.COM         [modified]
    [SYSEXE]DECC$SET_VERSIONS.COM         [new]
    [SYSEXE]DECC$SHOW_VERSIONS.COM        [new]
    [SYSTEST]DECC$IVP.COM                 [modified]

------------------------------------------------------


Next Contents