Compatibility Notes

Introduction

This release of the SAS/C Cross-Platform Compiler has new compiler option names and a different default pre-linker program. This appendix describes these changes and discusses their compatibility with previous releases.

Compiler Options

Prior to Release 6.00, most C parsing phase (phase 1) compiler options used the syntax:

 -W1,-option_name
where option_name was a mnemonic for the corresponding mainframe compiler option. In this release, these options have been replaced with options of the form:

 -Koption_name
where option_name more closely resembles the corresponding mainframe compiler option.

Options for several other compilation phases have also been replaced with -Koption_name forms, including:

Several non-phase-related options have also been renamed to indicate more accurately what the options are for.

Table 37 on page 116 shows the correspondence between the old option names and the new option names. To maintain compatibility with existing build procedures, the cross-platform compiler accepts the old names. However, we recommend that you migrate to the new names. For example, you can use either of the following commands and achieve the same results:

 sascc370 -Kredef -Kcomnest alpha.c  (new syntax)
 sascc370 -W1,-cr -W1,-cc alpha.c (old syntax)
These commands compile alpha.c and allow redefinition and stacking of #define names, and nested comments. For a complete description of these compiler options, see the section "Option Descriptions" on page 31.

TABLE 37. Compiler Option Changes in Release 6.00

----------------------------------------------------------------------------------------------
| Old Option          | New Option          | Description                                    |
==============================================================================================
| -W1,-ao             | -Kasciiout          | Character string constants are output as       |
|                     |                     | ASCII values.                                  |
----------------------------------------------------------------------------------------------
| -W1,-cc             | -Kcomnest           | Allow nested comments.                         |
----------------------------------------------------------------------------------------------
| -W1,-cg             | -Ktrigraphs         | Enable translation of ANSI standard            |
|                     |                     | trigraphs.                                     |
----------------------------------------------------------------------------------------------
| -W1,-co             | -Kppix              | Allow nonstandard token-pasting.               |
----------------------------------------------------------------------------------------------
| -W1,-cr             | -Kredef             | Allow redefinition and stacking of             |
|                     |                     | #define names.                                 |
----------------------------------------------------------------------------------------------
| -W1 -cs             | -Kstringdup         | Create a single copy of identical string       |
|                     |                     | constants.                                     |
----------------------------------------------------------------------------------------------
| -W1,-hs             | -Knohmulti          | Specifies that system include files will       |
|                     |                     | only be included once.                         |
----------------------------------------------------------------------------------------------
| -W1,-hl             | -Knoimulti          | Specifies that local include files will only   |
|                     |                     | be included once.                              |
----------------------------------------------------------------------------------------------
| -W1,-i              | -Kindep             | Generate code that can be called before        |
|                     |                     | the run-time library framework is              |
|                     |                     | initialized or code that can be used for       |
|                     |                     | interlanguage communication.                   |
----------------------------------------------------------------------------------------------
| -W1,-k              | -Ksmpxivec          | Generate a CSECT with a unique name of         |
|                     |                     | the form sname@. in place of                   |
|                     |                     | @EXTVEC# (for SMP support).                    |
----------------------------------------------------------------------------------------------
| -W1,!l              | -Knolineno          | Disable identification of source lines in      |
|                     |                     | run-time messages produced by the              |
|                     |                     | SAS/C Library.                                 |
----------------------------------------------------------------------------------------------
| -W1,-ll             | -Kstrict            | Enable an extra set of warning messages        |
|                     |                     | for questionable or nonportable code.          |
----------------------------------------------------------------------------------------------
| -W1,-q002=filename  | -Klisting=filename  | Specify the name of the listing file.          |
----------------------------------------------------------------------------------------------
| -W1,-v              | -Kvstring           | Generate character string literals with a      |
|                     |                     | 2-byte length prefix.                          |
----------------------------------------------------------------------------------------------
| -W2,-q001=filename  | -Ksrcis=filename    | Override the name of the source file in the    |
|                     |                     | debugging file.                                |
----------------------------------------------------------------------------------------------
| -W2,-q003=filename  | -Kdebug=filename    | Generate a .dbg370 debugging                   |
|                     |                     | information file and, optionally, specify      |
|                     |                     | the full name of the file.                     |
----------------------------------------------------------------------------------------------
| -W2,-q004           | -Ksingleret         | Forces the code generator to generate a        |
|                     |                     | single return sequence at the end of each      |
|                     |                     | function.                                      |
----------------------------------------------------------------------------------------------
| -W2,-q006           | -Knodbgcmprs        | Do not compress debugging information.         |
----------------------------------------------------------------------------------------------
| -Wg,-!inline        | -Knoinline          | Disable all inlining during the                |
|                     |                     | optimization phase.                            |
----------------------------------------------------------------------------------------------
| -Wg,-!inlocal       | -Knoinlocal         | Disable inlining of single-call, static        |
|                     |                     | functions during the optimization phase.       |
----------------------------------------------------------------------------------------------
| -WC,-wEn            | -w~n                | Cause warning message n to be treated as       |
|                     |                     | an error condition.                            |
----------------------------------------------------------------------------------------------
| -WC,-wMn            | -w+n                | Specify that warning number n should not       |
|                     |                     | be suppressed.                                 |
----------------------------------------------------------------------------------------------
| -WC,-wSn            | -wn                 | Suppress warning message number n.             |
----------------------------------------------------------------------------------------------
| -Knonuinc           | -Knousearch         | Specify #include file search rules that        |
|                     |                     | are not typical of UNIX.                       |
----------------------------------------------------------------------------------------------
| -se                 | -Kexclude           | Omit listing lines that are excluded by        |
|                     |                     | preprocessor statements from the               |
|                     |                     | formatted source listing.                      |
----------------------------------------------------------------------------------------------
| -sh                 | -Khlist             | Print standard header files in the formatted   |
|                     |                     | source listing.                                |
----------------------------------------------------------------------------------------------
| -si                 | -Kilist             | Print the source referenced by the             |
|                     |                     | #include statement in the formatted            |
|                     |                     | source listing.                                |
----------------------------------------------------------------------------------------------
| -sm                 | -Kmaclist           | Print macro expansions in the formatted        |
|                     |                     | source listing.                                |
----------------------------------------------------------------------------------------------
| -ss                 | -Ksource            | Output a formatted source listing of the       |
|                     |                     | program to the listing file.                   |
----------------------------------------------------------------------------------------------
| -sx                 | -Kxref              | Produce a cross-reference listing.             |
----------------------------------------------------------------------------------------------

Pre-Linker

In this release, the program cool replaces clink as the default object code preprocessor. If you do not suppress pre-linking with the -c compiler option, sascc370 and sasCC370 pre-link the object file with cool.

The cool program is designed to be backwards compatible with source code that was developed prior to Release 6.00. In addition to accepting all of the driver options supported by the old clink program, cool accepts the following options, which are new for this release:

Since clink is still distributed with the SAS/C Cross-Platform Compiler and C++ Development System, you can pre-link your program with clink, instead of cool, if desired. You can use either of the following methods: