Chapter Contents

Previous

Next
Compatibility Notes

Changes for Release 6.00

Release 6.00 of the SAS/C Cross-Platform Compiler has new compiler option names and a different default pre-linker program. The following sections describe these changes and discusse 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 -K option_name forms, including:

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

Compiler Option Changes in Release 6.00 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 Option Descriptions.

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:

  1. Use the -Kuse_clink compiler option to invoke clink automatically when you run sascc370 or sasCC370 . For example, the following commands compile alpha.c and pre-link the output file with clink :
    sascc370 -Kuse_clink -Anolineno alpha.c (new syntax)
    sascc370 -Kuse_clink -Wl,-d alpha.c (old syntax)

    You can pass any of the pre-linker options described in cool Options to clink , except the ones listed above, which are supported only by cool .

    In this release, the recommended way to pass an option to the pre-linker during compilation is with the -A option_name compiler driver form. In the first example above, the -Anolineno option is passed to the pre-linker to delete the line number and offset table CSECTs. However, for compatibility with existing build procedures, you can also specify the compilation phase with the -W l prefix. In the second example above, the -Wl , -d option is passed to the pre-linker, which has the same effect as specifying -Anolineno . Notice that you must use the actual pre-linker option (in this case -d ) when specifying the compilation phase with -W l. For more information about specifying the compilation phase, refer to Compiling C and C++ Programs.

  2. You can also suppress pre-linking when you compile your program and then call clink directly. For example, these commands compile alpha.c and pre-link the object file with clink in a separate step:
    sascc370 -c alpha.c
    
    clink -d alpha.o /libdir/libc.a

    You can specify any of the pre-linker options described in cool Options, except the ones listed above, which are supported only by cool . If you specify any cool -only options, they are ignored.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.