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:
2
)
g)
C)
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. | ----------------------------------------------------------------------------------------------
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:
-r
option suppresses the copying the run-time constants CSECTs to the output object file.
-s
nn option defines the number of lines per page in the listing file.
-vo
option creates only the EXTVEC# CSECT.
-xt
option invokes a user exit program with optional data.
-yl
option causes input control statements to be echoed to the listing.
-yg
option includes "gathered" symbols in the listing.
-yp
option includes a pseudoregister map in the listing.
-zc
option allows processing to continue even if a corrupted ar370
archive is detected.
-zd
option allows multiple input files to define the same SNAME.
-zi
option processes data after an INCLUDE statement in an input file.
-zv
option prints additional informational messages.
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:
-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 Table 13 on page 55 toclink
, except the ones listed above, which are supported only bycool
.
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 Chapter 3, "Compiling C and C++ Programs" on page 23.
clink
di
rectly. 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 Table 13 on page 55, except the ones listed above, which are supported only bycool
. If you specify anycool
-only options, they are ignored.