Chapter Contents |
Previous |
Next |
Compiling C and C++ Programs |
As
described in Using the SAS/C Cross-Platform Compiler and C++ Development System, the basic syntax for invoking the
sascc370
compiler driver to compile your C object code is as follows:
sascc370 [options] [filename1 [filename2...]]
The basic syntax for invoking the
sasCC370
compiler driver to compile your C++ object code is as follows:
sasCC370 [options] [filename1 [filename2...]]
The options argument for
sascc370
and
sasCC370
can be one or more of the driver options
described in the section Option Descriptions.
You can also specify
cool
options when you invoke the compiler
driver, which are described in Prelinking C and C++ Programs,
and CICS preprocessor options, which are described in Using the SAS/C CICS Command Preprocessor.
Specifying Phase of Compilation of C and C++ Programs |
Note:
Though short-form options may resemble
the OpenEditon shell options, they are often different.
Note:
For more information on long-form
and short-form compiler options, see the chapter about compiling
C programs in the SAS/C Compiler and Library User's Guide.
The compilation of a C or C++ program with the cross-platform
compiler occurs in the following phases:
Some of the options passed to the
sascc370
or
sasCC370
compiler driver apply only to one of these
phases. To indicate the particular phase of compilation, you must use the
following syntax when specifying these options:
-Wphase,option
Note:
There is no space after the comma between the
phase and the option specifications.
The phase can be any one of the following:
-W
followed by the letter
P
specifies that the option should be passed
to the CICS command pre-processor.
-W
followed by the letter
C
specifies that the option should be passed
to the C++ translation phase of the compilation.
-W
followed by the number
1
specifies that the option should be passed
to the C parser phase of the compilation.
-W
followed by the letter
g
specifies that the option should be passed
to the global optimizer.
-W
followed by the number
2
specifies that the option should be passed
to the code generation phase of the compilation.
-W
followed by the letter l specifies that the option should be passed to the
prelinker.
Note:
This book uses italics to help
you distinguish between the letter l and the number
1
.
The following examples illustrate how the compilation phase is specified:
-Wg,-a
-Wg
specification indicates that the
-a
option should be passed
to the global optimization phase of the compilation. The
-a
option specifies that the global optimizer should assume worst-case aliasing.
Note:
All of the global optimizer options described in this
chapter can also be passed to the compiler driver without specifying the compilation
phase. For example, to pass the
-a
option directly, specify
-Oa
.
-WP,-d
-WP
specification indicates
that the
-d
option should be passed to the CICS command preprocessor.
The
-d
option is described in Using the SAS/C CICS Command Preprocessor.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.