Chapter Contents

Previous

Next
Compiling C and C++ Programs

Option Descriptions

This section provides a more detailed description of each of the options that were summarized in Compiler Options. Unless otherwise specified, the options apply to both C and C++ source files.

-c
suppresses prelinking. By default, sascc370 and sasCC370 will invoke the prelinker after the compilation is complete. The -c option can be used to suppress this default action.

-cf
requires that all functions and function pointers have a prototype in scope. If the -cf option is used and a function or function pointer is declared or defined that does not have a prototype, the compiler issues a warning message.

Note:    The -cf option is equivalent to the SAS/C Compiler reqproto option for C compilations only.  [cautionend]

-cxx
specifies to sascc370 that .c files should be interpreted as C++ source files. Also, the C++ library will be used in all linking. This causes sascc370 to be functionally equivalent to sasCC370 .

-Dsym[=val]
defines a symbol, sym, and assigns an optional value, val.

The -D option is equivalent to the SAS/C Compiler define option.

-g
allows the use of the debugger to trace the execution of statements at run time. (The compiler produces debugging information that is written to the .dbg370 file.) For programs not compiled with -g , only calls can be traced.

Note:    If you use -g , the -l option, which enables the identification of source lines in run-time messages, is implied. Also note that the -g option causes the compiler to suppress all optimizations as well as store and fetch variables to or from memory more often.  [cautionend]

The -g option is equivalent to the SAS/C Compiler and C++ Development Systems debug option. (See -Kdebug .)

-Gfn
specifies the maximum number, n, of floating point registers that the optimizer can assign to register variables in a function. The n argument can have a value of 0 through 2, inclusive (the default is 2). The -Gf option is used only with optimization (specified by the -O option).

The -Gf option is equivalent to the SAS/C Compiler freg option. (See -Kfreg .)

-Gvn
specifies the maximum number, n, of registers that the optimizer can assign to register variables in a function. -Gv is used with -O only. The n argument is 0 to 6, inclusive (the default is 6).

The -Gv option is equivalent to the SAS/C Compiler greg option. (See -Kgreg .)

-Ipathname
appends the specified pathname to the lists of directories searched for include files. See Header Files for more information about the search path used by the cross-platform compiler.

-Kalias
is a synonym for the -Oa option.

-Karmode
specifies that code that uses the ESA access register may be generated. This option is required to compile code that uses far pointers. See the section on far pointer support in the SAS/C Compiler and Library User's Guidefor more information on the armode option, which is the host system version of the -Karmode option.

-Kasciiout
causes character string constants to be output as ASCII values. By default, character string constants are output as EBCDIC values.

The -Kasciiout option is equivalent to the SAS/C Compiler asciiout option.

-Kat
allows the use of the call-by-reference operator @.

The -Kat option is equivalent to the SAS/C Compiler and C++ Development Systems at option.

-Kautoinst
The -Kautoinst option controls automatic implicit instantiation of template functions and static data members of template classes. The compiler organizes the output object module so that COOL can arrange for only one copy of each template item to be included in the final program. In order to correctly perform the instantiation, the -Kautoinst option must be enabled on a compilation unit that contains both a use of the item and its corresponding template identifier. (See the SAS/C C++ Development System User's Guide, Second Edition, Release 6.50 for information about templates and automatic instantiation.)

Note:    COOL must be used if this option is specified.  [cautionend]

-Kbitfield=n
specifies the size of the allocation unit for int bitfields. This option requires that you specify a value, n. The values can be either 1, 2, or 4, which specifies that the allocation unit be a char , short , or long , respectively.

Note:    For C source files, this option allows non -int bitfields. For C++ source files, non -int bitfields are always allowed. Refer to SAS/C Compiler and Library User's Guide, Fourth Edition for more details.  [cautionend]

The -Kbitfield option is equivalent to the SAS/C Compiler and C++ Development Systems bitfield option.

-Kbytealign
aligns all data on byte boundaries. Most data items, including all those in structures, are generated with only character alignment.

Because formal parameters are aligned according to normal IBM System/370 conventions, even with the -Kbytealign option, you can call functions compiled with byte alignment from functions that are not compiled with byte alignment, and vice versa.

If functions compiled with and without byte alignment are to share the same structures, you must ensure that such structures have exactly the same layout. The layout is not exactly the same if any structure element does not fall on its usual boundary. For example, an int member's offset from the start of the structure is not divisible by 4. You can force such alignment by adding unreferenced elements of appropriate length between elements as necessary. If a shared structure does contain elements with unusual alignment, you must compile all functions that reference the structure using byte alignment.

The -Kbytealign option is equivalent to the SAS/C Compiler and C++ Development Systems bytealign option.

-Kcomnest
allows nested comments.

The -Kcomnest option is equivalent to the SAS/C Compiler comnest option. For C compilations only.

-Kcomplexity=n
is a synonym for the -Oic option.

-Kdbgmacro
specifies that definitions of macro names should be saved in the .dbg370 debugger file.

Note:    This substantially increases the size of the file.  [cautionend]

The -Kdbgmacro option is equivalent to the SAS/C Compiler dbgmacro option.

-Kdbgobj
causes the compiler to place the debugging information in the output object file, instead of a separate debugger file. If the debugging information is not placed in the object file, you cannot debug the automatically instantiated objects.

If automatic instantiation is specified with the -Kautoinst option, -Kdbgobj is enabled automatically.

By default, the -Kdbgobj option is off. The short form for the option is -xc . See the SAS/C C++ Development System User's Guide, Second Edition, Release 6.50 for information about templates and automatic instantiation.

Note:    COOL must be used if this option is specified.  [cautionend]

-Kdbhook
generates hooks in the object code. When you compile a module with the -g option, the -Kdbhook option is implied. -Kdbhook can be used with the -O option to enable debugging of optimized object code.

The -Kdbhook option is equivalent to the SAS/C Compiler dbhook option.

-Kdebug[=dbg370-filename]
generates debuggable code and produces a .dbg370 debugging information file. Optionally, you can specify the name of the debugging information file with the -Kdebug=dbg370-filename option.

The -Kdebug option is similar to the -g option. When you specify -Kdebug=dbg370-filename , -g is assumed.

-Kdepth=n
is a synonym for the -Oid option.

-Kdigraph

Digraph options enable the translation of the International Standard Organization (ISO) digraphs and the SAS/C digraph extensions.

A digraph is a two character representation for a character that may not be available in all environments. The different options allow you to enable subsets of the full digraph support offered collectively by ISO and SAS/C. Digraph Descriptions gives a brief description of the new digraph compiler options.

Digraph Descriptions
Digraph
No.
Description
0 Turn off all digraph support
1 Turn on New ISO digraph support
2 Turn on SAS/C Bracket digraph support - '(|' or '|)'
3 Turn on all SAS/C digraphs.

Digraph Default and Negated Forms provides the default values and an example of how to negate the options in each of the different environments.

Digraph Default and Negated Forms
Environment Default Options Negated Options
IBM 370 (Long Form) DI(1) ,

DI(3)

NODI(1) ,

NODI(3)

IBM 370 and Cross (Short Form) -cgd1 ,

-cgd3

!cgd1 ,

!cgd3

Cross Compiler and IBM 370 UNIX System Services -Kdigraph1 ,

-Kdigraph3

!Kdigraph1 ,

!Kdigraph3

ISO digraph Alternative Tokens lists several of the ISO digraph sequences from the C++ ANSI draft. Basically, the alternative sequence of characters is an alternative spelling for the primary sequence. Similar to SAS/C digraphs, substitute sequences are not replaced in either string constants or character constants.

ISO digraph Alternative Tokens
Rel 6.50 Tokens
Primary Alternate
{ <%
} %>
[ <:
] :>
# %:
## %:%:

Note:    See the chapter about special character support in the SAS/C Compiler and Library User's Guide for more information on digraphs.  [cautionend]

-Kdollars
allows the use of the $ character in identifiers, except as the first character.

The -Kdollars option is equivalent to the SAS/C Compiler dollars option.

-Kexcept
Enables code generation for exception handling in the C++ translator. This option is not enabled by default because it can add additional overhead to the generated code. If exception handling is required then it is recommended that all C++ compilation units be compiled with the -Kexcept option. Otherwise unpredictable effects may occur if an exception is thrown.

-Kexclude
omits listing lines from the formatted source that are excluded by #if , #ifdef , and so on. For example, in the following sequence
#ifdef MAX_LINE
     printf("Line overflow n");
#endif
the -Kexclude option omits the printf statement from the formatted source listing if MAX_LINE is not currently defined with the #define command.

The -Kexclude option is equivalent to the SAS/C Compiler exclude option.

-Kfreg=n
is a synonym for the -Gf option.

-Kgreg=n
is a synonym for the -Gv option.

-Khlist
prints system header files in the formatted source listing. These are files that are included using the following syntax:
#include <filename.h>

The -Khlist option is equivalent to the SAS/C Compiler hlist option. See also -Kilist .

-Kigline
causes the compiler to ignore any #line statements in the input file.

The -Kigline option is equivalent to the SAS/C Compiler igline option.

-Kilist
prints user header files in the formatted source listing. These are files that are included using the following syntax:
#include "filename.h"

The -Kilist option is equivalent to the SAS/C Compiler ilist option. See also -Khlist .

-Kindep
generates code that can be called before the framework is initialized or code that can be used for interlanguage communication.

The -Kindep option is equivalent to the SAS/C Compiler indep option. The SAS/C Compiler and Library User's Guide, Fourth Edition covers the indep option in detail.

-Kjapan
translates keywords and identifiers that are in uppercase to lowercase before they are processed by the compiler. Prints messages in uppercase. This option is intended to be used with terminals or printers that support only uppercase (Roman) characters.

-Klisting[=list-filename]
produces a listing file for all phases of the compilation and, optionally, directs the listing to the specified file. If you do not specify a file name, the base file name of the source file will be used to construct the listing file name. See the cool prelinker option -h for information about how messages are handled when a listing is produced.

-Kloop
specifies that the global optimizer should perform loop optimizations. This option can only be used with the -O option.

The -Kloop option is equivalent to the SAS/C Compiler loop option. The -Kloop option and the -Ol option are synonyms. Refer to the SAS/C Compiler and Library User's Guide for more information about loop optimization.

Note:    The behavior of the mainframe SAS/C Compiler is different from the SAS/C Cross-Platform Compiler. Loop optimization is the default on the mainframe.  [cautionend]

-Kmaclist
prints macro expansions. Source code lines containing macros are printed before macro expansion.

The -Kmaclist option is equivalent to the SAS/C Compiler maclist or mlist option.

-Knarrow
compresses the width of the listing to make it fit better on small screens.

-Knodbgcmprs
disables compression of the .dbg370 debugging information file. By default, this information is compressed to save disk space and reduce network traffic while debugging.

The -Knodbgcmprs option is only meaningful when used with the -g option.

-Knoextname
disables the use of extended names. By default, external names that are longer than 8 characters will be accepted by the compiler, unless you specify the -Knoextname option. -Knoextname applies only to C compilations; extended names processing cannot be disabled for C++.

Note:    When prelinking object modules produced by the compiler using -Kextname , cool checks for and prohibits the linking of two object modules with the same section name, by default. (See -Ksname option.) If cool detects an object module that has the same section name as a previously processed object module, it will issue an error message and exit.

Also note that you cannot use cool more than once on any object file that was previously compiled with the -Kextname option. Because cool resolves external references with extended names into their final form, it will not accept references that have been previously resolved.  [cautionend]

The -Knoextname option is equivalent to the SAS/C Compiler noextname option. For more information on extended names, refer to the SAS/C Compiler and Library User's Guide, Fourth Edition.

Note:    In this release, -Kextname is the default. This differs from previous releases where you had to specify -Kextname explicitly to enable the use of extended function and identifier names.  [cautionend]

-Knohmulti
disables the reinclusion of system header files; these files will only be included once. (System header files are specified within angle brackets.) If -Knohmulti is specified, the cross-platform compiler will only include code from a header file once in a compilation. By default, the cross-platform compiler includes a copy of the header file code every time a #include <filename> statement is encountered, even if the file has already been included.

Note:    The -Knohmulti option is equivalent to the SAS/C Compiler nohmulti option for C compilations only.  [cautionend]

-Knoimulti
disables the reinclusion of user header files; these files will only be included once. (User header files are specified within double quotes.) If -Knoimulti is specified, the cross-platform compiler will only include code from a header file once in a compilation. By default, the cross-platform compiler includes a copy of the header file code every time a #include "filename" statement is encountered, even if the file has already been included.

Note:    The -Knoimulti option is equivalent to the SAS/C Compiler noimulti option. (Notice that the behavior of the mainframe SAS/C Compiler is different than that of the SAS/C Cross-Platform Compiler. Reinclusion of header files is disabled by default on the mainframe.) For C compilations only.  [cautionend]

-Knoinline
disables all inlining of functions during the optimization phase. If this option is not specified, functions specified as inline will be inlined by default. (Also see the -Oin option.)

The -Knoinline option is equivalent to the SAS/C Compiler noinline option.

-Knoinlocal
disables inlining of single-call, static (local) functions. These functions are not inlined by default during the optimization phase. (Also see the -Oil option.)

The -Knoinlocal option is equivalent to the SAS/C Compiler noinlocal option.

-Knolineno
disables identification of source lines in run-time messages. When -Knolineno is specified, module size is decreased because the generation of line number and offset tables is not required.

The -Knolineno option is equivalent to the SAS/C Compiler nolineno option.

-Knostringdup
creates a single copy of identical string constants.

The -Knostringdup option is equivalent to the SAS/C Compiler nostringdup option.

-Knousearch
specifies include-file search rules that are not typical of UNIX compilers. -Kusearch is the default. See Header Files for additional information.

-Komd[=omd-filename]
invokes the object module disassembler (OMD) after successful compilation and, optionally, directs the .omd listing to the specified file. If you do not specify a file name, the compiler derives the listing file name from the basename of the input file with a .omd suffix. Also see the -S option.

-Koptimize
is a synonym for the -O option.

-Koverload
turns on recognition of the overload C++ keyword. If you specify this option, the translator recognizes overload as a reserved word; otherwise, it is treated as an identifier. For additional information, see the SAS/C Development System User's Guide, Volume 1: Introduction, Compiler, Editor. For C++ compilations only.

-Kpagesize=nn
defines the number of lines per page for source and cross-reference listings. The default is 60 lines per page.

Note:    The -Kpagesize=nn option is similar to the SAS/C Compiler pagesize option for C compilations only.  [cautionend]

-Kpflocal
assumes that all functions are _ _local unless _ _remote was explicitly specified in the declaration. By default, the compiler treats all function pointers as _ _remote unless they are explicitly declared with the _ _local keyword.

The -Kpflocal option is equivalent to the SAS/C Compiler pflocal option.

-Kposix
instructs the compiler to create a POSIX-compliant program by setting compile-time and run-time defaults for maximum POSIX compatibility. The -Kposix option has the following effects on compilation:

Additionally, if any compilation in a program's main load module is compiled with the -Kposix option, it has the following effects on the execution of the program:

Note:    You should not use the -Kposix option when compiling functions that can be used by both POSIX and non-POSIX applications.  [cautionend]

The -Kposix option is equivalent to the SAS/C Compiler posix option. See the SAS/C Compiler and Library User's Guide, Fourth Edition for more information.

-Kppix
allows nonstandard use of the preprocessor.

If the -Kppix option is in effect, the preprocessor allows token-pasting by treating a comment in macro replacement text as having zero characters. The ANSI Standard defines the ## operator to perform token-pasting.

This option also specifies that the preprocessor should replace macro arguments in string literals. Equivalent functionality can be gained for portability by using the ANSI Standard # operator.

Note:    The -Kppix option is equivalent to the SAS/C Compiler ppix option for C compilations only.  [cautionend]

-Krdepth=n
is a synonym for the -Oir option.

-Kredef
allows redefinition and stacking of #define names.

The -Kredef option is equivalent to the SAS/C Compiler redef option.

-Krefdef
forces the use of the strict reference-definition model for external linkage of _ _rent identifiers. The -Krefdef option causes the compiler to generate code that forces the use of the strict reference-definition model for reentrant external variables. If the strict reference-definition model is not used, the compiler uses the common model. This option is meaningful primarily when used with the -Krent or -Krentext options. (Strict reference-definition is always used for _ _norent identifiers.)

Because of the fact that a reference is also a definition in the common model, it is also recommended that you use the -Krefdef option when linking with ar370 archives, to cause proper resolution of variable definitions.

The -Krefdef option is equivalent to the SAS/C Compiler and C++ Development Systems refdef option.

-Krent
allows reentrant modification of static and external data.

The -Krent option is equivalent to the SAS/C Compiler and C++ Development Systems rent option.

-Krentext
allows reentrant modification of external data.

The -Krentext option is equivalent to the SAS/C Compiler and C++ Development Systems rentext option.

-Krtti
enables the generation of information for RTTI on class objects that have virtual functions. By default, this option is not enabled because it increases the number of virtual function tables and the size of the information used to implement virtual function calls.

If your program uses the dynamic_cast or typeid() operators, the -Krtti option must be specified for each compilation unit to assure the class objects have the information required for dynamic type identification.

-Ksingleret
forces the cross-platform compiler to generate a single return sequence at the end of each function. By default, the cross-platform compiler generates a return sequence at the location of each return statement within a function. The main advantage of the -Ksingleret option is that it causes a single return from functions that have multiple return statements. The code to execute the single return from the function is emitted at the end of the function, with return statements within the function causing a branch to that single return location.

-Ksmpxivec
generates a CSECT that is used in place of @EXTERN#. The CSECT generated by the -Ksmpxivec option has a unique name of the following form:
sname@.

The sname@. vector provides an alternate mechanism for reentrant initialization of static and extern data that is used with System Modification Program (SMP) update methods, which are described in Programmer's Report: SMP Packaging for SAS/C Based Products.

The -Ksmpxivec option is equivalent to the SAS/C Compiler smpxivec option. For this option to be effective, you must have the SMP libraries.

Note:    The -Asmpxivec cool option must be used in conjunction with the -Ksmpxivec compiler option. The -Asmpxivec cool option builds a vector named @EXTVEC# that references the sname@. CSECT generated by the -Ksmpxivec compiler option. For example, the following command could be used to invoke the sascc370 compiler driver:

sascc370 -Ksmpxivec -Asmpxivec filename.c
  [cautionend]

In this case, the -Asmpxivec option is passed to the prelinker. See Prelinking C and C++ Programs for information about the -Asmpxivec cool option.

-Ksname=sname
defines the section name. The sname argument can be up to seven characters in length.

The section name is assigned by the compiler using the first applicable rule in the following list:

The -Ksname option is equivalent to the SAS/C Compiler and C++ Development Systems sname option.

-Ksource
outputs a formatted source listing of the program to the listing file.

The -Ksource option only controls the source listing; the cross-reference listing is requested with the -Kxref option.

The -Ksource option is similar to the SAS/C Compiler source option.

-Ksrcis=source-filename
specifies the name of the source file in the debugging file. This option is meaningful only when used with the -g option or -Kdebug option.

-Kstrict
enables an extra set of warning messages for questionable or nonportable code. See SAS/C Software Diagnostic Messages for more information.

Note:    The -Kstrict option is equivalent to the SAS/C Compiler strict option for C compilations only.  [cautionend]

-Ktmplfunc
Controls whether a nontemplate function declaration that has the same type as a template specialization refers to the template specialization. When -Knotmplfunc is specified, template specializations may also be referred to by nontemplate declarations. -Knotmplfunc provides compatibility with older code. -Ktmplfunc is the default for compatibility with the ISO C++ Standard.

-Ktrigraphs
enables translation of ANSI standard trigraphs.

Note:    The -Ktrigraphs option is equivalent to the SAS/C Compiler trigraphs option for C compilations only.  [cautionend]

-Kundef
is a synonym for the -U option.

-Kuse_clink
uses the program clink as the object code preprocessor. By default, the SAS/C C and C++ cross-compiler uses the cool program to prelink the object file. For more information about clink , see Compatibility Notes.

-Kvstring
generates character string literals with a 2-byte length prefix. This option is used primarily in conjunction with the interlanguage communication feature.

The -Kvstring option is equivalent to the SAS/C Compiler vstring option. For more information on the vstring option, see the chapter about communication with other languages, in the SAS/C Compiler Interlanguage Communication Feature User's Guide.

-Kxref
produces a cross-reference listing.

The -Kxref option is equivalent to the SAS/C Compiler xref option.

-Kzapmin=n
specifies the minimum size of the patch area, in bytes. n refers to the number of bytes in the patch area. The default is 24 bytes.

The -Kzapmin option is equivalent to the SAS/C Compiler and C++ Development Systems zapmin option. For more information about the patch area, refer to the SAS/C Compiler and Library User's Guide .

-Kzapspace=fn
alters the size of the compiler-generated patch area. The size of the patch area can be increased or its generation suppressed. The default is 1.

The -Kzapspace option accepts an integer value between 0 and 22, inclusive, that specifies the factor by which the default patch area size is to be multiplied. If the factor is 0, then no patch area is generated. For example, if the default patch area is 48 bytes and the -Kzapspace option specifies a factor of 3, then the patch area actually generated is 144 bytes long. In no case does the compiler generate more than 512 bytes of patch area.

The -Kzapspace option is equivalent to the SAS/C Compiler zapspace option. For more information about the patch area, refer to the SAS/C Compiler and Library User's Guide.

-mrc
causes the cross-platform compiler to generate mainframe return codes when syntax and semantic errors are detected during compilation. The mainframe return codes generated when the -mrc option is in effect are summarized in Mainframe Return Codes.

Mainframe Return Codes
Code Definition
0 No errors or warnings found: object code is generated.
4 Warning: object code is generated and it will probably execute correctly.
8 Serious error: object code is generated but it may not execute correctly.
12 Serious error: no object code is generated and pass two of the compiler is not executed.
16 Fatal error: Compilation stops.

By default, the cross-platform compiler's return codes are similar to the return codes of a native UNIX compiler. In this case, a return code greater than 0 is an error. This behavior is consistent with what is expected by UNIX tools, such as make .

-O
executes the global optimizer phase of the compiler, which optimizes the flow of control and data through an entire function.

Global optimization includes a wide variety of optimizations, such as:

The cross-platform compiler accepts the following options to modify the operation of the global optimizer: -Gfn , -Gvn , -Oa , -Oic=n , -Oid=n , -Oil , Oin , -Oir=n , and -Ol .

The -O option is equivalent to the SAS/C Compiler optimize option. See Using the Global Optimizer and the Object Module Disassembler for more information about the optimize option and the global optimizer. (See -Koptimize .)

-Oa
disables type-based aliasing assumptions. If -Oa is used, the global optimizer uses worst-case aliasing. Use of this option can significantly reduce the amount of optimization that can be performed. This option can only be used with the -O option.

The -Oa option is equivalent to the SAS/C Compiler alias option. (See -Kalias .)

-Oic=n
specifies the maximum complexity that a function can have and remain eligible for default inlining. The range of n is 0 to 20; with 0 specifying that only very small functions should be inlined, and 20 specifying that relatively large functions should be inlined. The -Oic option is set to 0 by default. This option is used with the -Oin option, which enables the default inlining of small static and extern functions.

The -Oic option is equivalent to the SAS/C Compiler complexity option. (See -Kcomplexity .)

-Oid=n
defines the maximum depth of function calls to be inlined. The range of n is 0 to 6, and the default value is 3. This option can only be used with the -O option.

The -Oid option is equivalent to the SAS/C Compiler depth option. (See -Kdepth .)

-Oil
inlines single-call, static functions. This option can only be used with the -O option.

The -Oil option is equivalent to the SAS/C Compiler inlocal option. (See -Kinlocal .)

-Oin
enables inlining of small static and extern functions, in addition to the inlining of functions defined with _ _inline keyword. The complexity of the functions that are inlined, other than those that are defined with the _ _inline keyword, is controlled by the -Oic option. The -Oic option must be specified for some non-zero n to enable the inlining of small functions. The -Oin and -Oic options can only be used with the -O option.

The -Oin option is similar to the SAS/C Compiler inline option. (Even if -Oin is not specified, functions defined with the _ _inline keyword will be inlined.) (See -Kinline .)

-Oir=n
defines the maximum level of recursive function calls to be inlined. The range of n is 0 to 6, and the default is 0. This option can only be used with the -O option.

The -Oir option is equivalent to the SAS/C Compiler rdepth option. (See -Krdepth .)

-Ol
specifies that the global optimizer should perform loop optimizations. This option can only be used with the -O option.

The -Ol option is equivalent to the SAS/C Compiler loop option. (Notice that the behavior of the mainframe SAS/C Compiler is different than that of the SAS/C Cross-Platform Compiler. Loop optimization is the default on the mainframe.) Refer to the SAS/C Compiler and Library User's Guide for more information about loop optimization. (See -Kloop .)

-o filename
specifies the name of the output file. If the -c option is used, filename specifies the name of the output object file. Otherwise, filename specifies the name of the prelinked file. If the -o option is not specified, output is written to the a.out file by default.

The -o option is similar to the SAS/C compiler object option. Refer to the SAS/C Compiler and Library User's Guide, Fourth Edition for more information.

-P
creates a file containing preprocessed source code for this compilation. Preprocessed source code has all macros and #include files expanded. If the -P option is used, all syntax checking (except in preprocessor directives) is suppressed, no listing file is produced, and no object code is generated.

If -o is specified together with -P , the preprocessed source code is written to the file specified by -o . If -o is not specified, the preprocessed source code is written to a file with a .i extension. The name of the default output file is derived from the basename of the source file.

The -P option is equivalent to the SAS/C Compiler pponly option.

-Qpathname
specifies an alternative pathname to be searched for the cross-platform compiler executable files. The location of the executable files that compose the SAS/C Cross-Platform Compiler ( sascc370 , lc1 , lc2 , cool , go , and omd ) is defined when the SAS/C Cross-Platform Compiler is installed. This location is host specific, and is usually in the host /host-type/ bin subdirectory.

-S
invokes the object module disassembler (OMD) after successful compilation. OMD-only options and selected compilation options are passed to the OMD, as explained in the SAS/C Compiler and Library User's Guide.

The -S option is equivalent to the SAS/C Compiler omd option. (See -Komd .)

-Tallres
specifies use of the all-resident library, libares.a, which is prefixed to the resident library, libc.a . The -Tallres option should be specified when developing an all-resident application. Refer to the SAS/C Compiler and Library User's Guide for more information about all-resident programs.

Note:    The -Tallres option must be combined with either the -Tcms370 or the -Tpcms370 option to generate an all-resident application targeted for CMS.  [cautionend]

Note:    The -Tspe option is not allowed in combination with the -Tallres option.  [cautionend]

-Tcics370
specifies that CICS is the target. The -Tcics370 option causes the driver to specify the CICS libraries during linking and add the -m option to the cool command.

Note:    When you use cool to link a CICS application, you will receive warnings about unresolved references to the following: DFHEI1 , DFHEAI , and DFHAI0 . These warning messages are expected. The output object file from cool must subsequently be moved to the target mainframe and linked with the CICS Execution Interface stubs.  [cautionend]

Note:    If specifying the -Tcics370 option causes the sascc370 driver to also issue -m to cool , then using the sascc370 driver option -Aclet is redundant.  [cautionend]

-Tcicsvse
specifies that CICS running under the VSE operating system is the target. The -Tcicsvse option causes the driver to specify the CICS VSE libraries during linking and add the -p option (remove pseudoregisters) and the -m option to the cool command.

Note:    The -Tspe option is not allowed in combination with the -Tcicsvse option.

Note:    When you use cool to link a CICS application, you will receive warnings about unresolved references to the following: DFHEI1 , DFHEAI , and DFHAI0 . These warning messages are expected. The output object file from cool must subsequently be moved to the target mainframe and linked with the CICS Execution Interface stubs.  [cautionend]

Note:    If specifying the -Tcics370 option causes the sascc370 driver to also issue -m to cool , then using the sascc370 driver option -Aclet is redundant.  [cautionend]
  [cautionend]

-Tcms370
specifies CMS running under VM/ESA or VM/XA as the target host operating system. The -Tcms370 option should be specified when your application is targeted for CMS under VM/XA, VM/ESA, or VM/SP release 6.

Under VM/XA or VM/ESA, programs can run either in 24-bit addressing mode, or in 31-bit addressing mode.

Note:    The cross-platform compiler generates code that is targeted for OS/390 by default.  [cautionend]

-Tpcms370
specifies CMS supporting System/370 mode (pre-bimodal) as the target host operating system. The -Tpcms370 option should be specified when your CMS application will run under VM/SP release 5 or earlier. 370 mode does not support 31-bit addressing.

-Tspe
specifies use of the SAS/C SPE library, libspe.a , which replaces the resident library, libc.a . The -Tspe option should be specified when developing an SPE application. Refer to the SAS/C Compiler and Library User's Guide, Fourth Edition for more information about systems programming with the SAS/C Compiler.

Note:    The -Tspe option must be combined with either the -Tcms370 or the -Tpcms370 option to generate an SPE application targeted for CMS.

Note:    The -Tallres and -Tcicsvse options are not allowed in combination with the -Tspe option.  [cautionend]
  [cautionend]

-temp=directory
specifies an alternative directory used to store temporary files.

-U
undefines predefined macros.

Predefined macros are defined as follows:

#define DEBUG 1
#define NDEBUG 1
#define I370 1
#define OSVS 1
#define CMS 1

The definition of the DEBUG or the NDEBUG macro depends on whether you have specified the -g option. The OSVS and CMS macro definitions depend on the -Tcms370 and -Tpcms370 options. The OSVS macro is defined if neither the -Tcms370 nor the -Tpcms370 option is specified. If either of these options is specified, the CMS macro is defined.

The -U option is equivalent to the SAS/C Compiler undef option. (See -Kundef .)

-v
specifies verbose mode. In verbose mode, the command line that executes each phase of the cross-platform compiler is displayed.

-w~n

treats a warning condition as an error condition. The warning condition is identified by its associated message number n. Conditions whose numbers have been specified are treated as errors, and cause an error return code from the compiler. By default, a non-zero value greater than 1 is returned. If the -mrc option is also specified, a return code of 12 will be generated for a warning condition instead of a return code of 4.

Any number of warning conditions can be specified by entering additional -w~ options. See also the -w option.

The -w~ option is similar to the SAS/C Compiler enforce option.

-w+n
specifies that a warning, whose number is specified as n, is not to be suppressed.

Any number of warning conditions can be specified by entering additional -w+ options. See also the -w option.

The -w+ option is similar to the SAS/C Compiler mention option.

-wn
ignores a warning condition. Each warning condition is identified by its associated message number n. Conditions whose numbers have been specified are suppressed. No message is generated, and the compiler return code is unchanged. For more information about related messages, see SAS/C Software Diagnostic Messages.

Any number of warning conditions can be specified by entering additional -w options. If both -w and -w ~ specify the same message number, the warning is enforced.

The -w option is similar to the SAS/C Compiler suppress option.

The -w option will be passed by the driver to the appropriate phase of the compilation process, C or C++ phase. To optionally specify a compiler phase, use the syntax as described in "Specifying Phase of the Compilation of C and C++ Programs" in Chapter 3, "Compiling C and C++ Programs," in the SAS/C Cross-Platform Compiler and C++ Development System: Usage and Reference. The format of the command is as follows:

-WC,-wSnnn
-W1,-ynnn
where:

-WC,-wS nnn
Suppresses C++ warning and error messages, and nnn represents the message number that is to be suppressed.

-W1,-y nnn
Suppresses C warning and error messages, and nnn represents the message number that is to be suppressed.


Chapter Contents

Previous

Next

Top of Page

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