Chapter Contents |
Previous |
Next |
Translator Options |
The following list gives detailed descriptions of the options listed in Translator Options.
alias
(
-Kalias
under USS)optimizeoption in the SAS/C Compiler and Library User's Guide for details on this option. This option can only be used in conjunction with the
optimize
option.
arlib
arlib
is valid under TSO only and
cannot be specified together with the
object
option.
The
arlib
option is specified as follows:
arlib(dsname)
arlib('''master.object.a''')
You can use the
member
option to specify the archive
member name in which the object code is to be stored. If
arlib
is specified
and
member
is not specified, the default member name is the partitioned
data set (PDS) member name of the source file. If the source file is not a
PDS member, you must supply a member name if you use the
arlib
option.
asciiout
(-Kasciiout
under UNIX System Services)noasciiout
,
and the minimum abbreviation is as
. When the asciiout
option is used, the compiler generates string literals
and character literals using the ASCII character set instead of the default
EBCDIC character set. String literals are translated from IBM Code Page 1047
and ISO 8559-1, the Latin-1 character set.
at
(
-Kat
under USS)autoinst
(
-Kautoinst
under USS)autoinst
option must be enabled on a compilation unit that contains both a
use of the item and its corresponding template definition.
Note:
Automatic instantiation requires that the translation of the C++ code to C
code must occur as part of the same process that generates the object module.
Therefore, while the
savec
and the
tronly
options
can be used with the
autoinst
option, the resulting C code cannot be compiled with the C compiler
to produce an equivalent object module at a later time.
In Release 6.50, the compiler allows for the generation of automatically
instantiated template functions, when the
autoinst
compiler option is specified. When this option is specified, the compiler
uses a "shelled object" format containing the output of the primary
compilation and all template functions needed by that compilation. In this
release, COOL has been modified to process this new object format and the "shelled"
template functions.
When a "shelled object" is encountered by COOL, the primary object deck is processed, and any template function objects are processed if a template function by the same name has not already been processed. This results in the inclusion of the first template function found with a given name.
Note: "shelled objects" are specified in the same
manner as any other object deck.
bitfield
(
-Kbitfield=n
under USS)int
bitfields. (C++, unlike C, supports bitfields
that are not integers.)
The following allocation units are valid:
1 |
indicates the allocation unit is
a
char
. |
2 |
indicates the allocation unit is
a
short
. |
4 |
indicates the allocation unit is
a
long
. |
The default allocation unit is a
long
(4).
Under TSO and OS/390 batch, the
bitfield
option
is specified as follows:
bitfield(value)
For example, the following option specification indicates
the allocation unit for
int
bitfields is a short:
bitfield(2)
Under CMS, the
bitfield
option is specified as follows:
bitfield value
For example, the following option specification indicates
the allocation unit for
int
bitfields is a
long
:
bitfield 4
bytealign
(
-Kbytealign
under USS)bytealign
option, you can call functions
compiled with byte alignment from functions that are not compiled with byte
alignment and vice versa.
You can attach the
_ _noalignmem
keyword to structure
definitions to force the structure to be byte-aligned. Use the
_ _alignmem
keyword to force structures to be normally aligned even in modules
compiled with the
bytealign
option.
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.
complexity
(
-Kcomplexity=n
under
USS)inline
keyword from C++ or the
_ _inline
keyword from SAS/C and is used only in conjunction with the
optimize
option. See the
optimize
option in the SAS/C Compiler and Library
User's Guide
for more details.
dbgmacro
(
-Kdbgmacro
under USS) dbgobj
(
-Kdbgobj
under USS)
If automatic instantiation is specified with the
autoinst
option,
dbgobj
is enabled automatically.
By default, the
dbgobj
option is off. The short form for the option is
-xc
.
debug
(
-Kdebug[=filename]
under USS)debug
option causes the compiler to suppress all optimizations as well
as store and fetch variables to or from memory more often.
define
(
-D[sym=val]
under USS)
Under OS/390 batch and CMS, you can use the
define
option
more than once, to define any number of symbols. If the same symbol is defined
twice, only the last value applies.
Under TSO, the
define
option can be used only once.
If you specify this option more than once, only the last specification is
used. Also note that TSO uppercases the text of the
define
option
before it is passed to the translator.
Under TSO, the specification is the following:
define(symbol) define(symbol=value)
define(USERDATA) define(TSO=1)
Under CMS, the specification is the following:
define symbol define symbol=value
define USERDATA define CMS=1
Under OS/390 batch, the
define
option is specified as follows:
define(symbol)
define(USERDATA) define(MYSYM=ABC)
depth
(
-Kdepth=n
under
USS)optimize
option.
See the
optimize
option
in the SAS/C Compiler and Library User's Guide for more information.
Specify
depth
as follows, where n
is between 0 and 6, inclusive (the default is 3):
System | Syntax |
---|---|
OS/390 batch |
depth (n)
|
TSO |
depth(n)
|
CMS |
depth n
|
digraph
(
-Kdigraph[n]
under USS)
System | Syntax |
---|---|
OS/390 Batch |
digraph(n)
|
TSO |
digraph(n)
|
CMS |
digraph n
|
where
n
is between 0 and 3,
inclusive. Specify
n
as follows:
digraph(1) and digraph(2)
See Special characters and Alternate forms for operators and tokens for more information.
dlines
#line
directives
in the preprocessed C++ source code. This option has an effect only when the
pponly
option is in effect.
dollars
(
-Kdollars
under USS)$
character
in identifiers, except as the first character.(footnote 1)
enforce
(
-w~n
under USS)
Under TSO, specify the
enforce
option as follows:
enforce (n)
enforce('n1,n2,...')
enforce n enforce n1 n2 ...
Under OS/390 batch, use the following:
enforce(n) enforce(n1,n2,...)
Any number of warning messages can be specified. If
both
suppress
and
enforce
specify the same warning message number,
the warning is enforced.
-Kexcept
option. Otherwise unpredictable effects may occur
if an exception is thrown.
files
files(cxx)
In this case, some of the DDname replacements are as follows:
Original | Replacement |
---|---|
SYSTROUT | CXXTROUT |
freg
(
-Kfreg=n
under USS)optimize
option in the SAS/C Compiler and Library User's Guide for additional details.
Specify
freg
as follows, where n
is between 0 and 2, inclusive (the default is 2):
System | Syntax |
---|---|
TSO |
freg(n)
|
CMS |
freg n
|
greg
(
-Kgreg=n
under USS)optimize
option. See the
optimize
option in the SAS/C Compiler and Library Guide
for more details.
Specify
greg
as follows, where n
is between 0 and 6, inclusive (the default is 6):
System | Syntax |
---|---|
TSO |
greg(n)
|
CMS |
greg n
|
hlist
(
-Khlist
under USS)#include <name.h>or
#include <name>
hmulti
(
-Khmulti
under USS)hmulti
is the default. If
nohmulti
is used, then the translator
does not reinclude a header file specified within angle brackets.
hxref
(
-Khxref
under USS)hlist
for a description of header files.
ilist
(
-Kilist
under
USS)#include
statement
in the formatted source listing. The
#include
filename appears in the right margin of each line taken from
the
#include
file. See
also
hlist
imulti
(
-Kimulti
under USS) imulti
is the default. If
noimulti
is
used, then the translator does not reinclude a header file specified within
double quotes.
indep
(
-Kindep
under USS) inline
(
-Kinline
under
USS)complexity
and those with the C++
inline
keyword or the SAS/C
_ _inline
keyword. This option
is used only with the
optimize
option. See the
optimize
option in the SAS/C Compiler and Library User's Guide for more
details.
inlocal
(
-Kinlocal
under USS)static
functions.
This option is used only with the
optimize
option. See the
optimize
option in the SAS/C Compiler and Library User's Guide for more
information.
ixref
(
-Kixref
under USS)#include
files.
lib
lib
option is specified as follows:
lib(dsname)
This option indicates the name of a library that contains
header files, that is, one containing members that are to be included using
the
#include <member.h>
(or
<member>
) form of the
#include
statement.
If the library belongs to another user, the fully qualified name of the data
set must be used and the name must be preceded and followed by three apostrophes
(because of CLIST language requirements). No final qualifier is assumed for
a
lib
data set.
Using
nolib
indicates that no header file libraries are
required other than the standard library provided with the translator.
nolib
is the default.
lineno
(
-Klineno
under USS)lineno
is specified, module size is increased because of the generation of
line number and offset tables.)
loop
(
-Kloop
under USS)optimize
option in the SAS/C Compiler and Library User's Guide for more details on this option. This option is used only with the
optimize
option.
maclist
(
-Kmaclist
under
USS) member
member
is valid under TSO only. The
member
option is specified as follows:
member(member-name)
where member-name is a valid OS/390 member name.
The
member
option is valid only if the
arlib
option
is also specified. Otherwise,
member
is ignored.
If
arlib
is specified and
member
is not specified, the default
member name is the PDS member name of the source file. If the source file
is not a PDS member, you must supply a member name if you use the
arlib
option.
mention
(
-w+n
under USS) suppress
option as well.)
Under TSO, specify the
mention
option as follows:
mention(n)
mention('n1,n2,...')
mention n mention n1 n2 ...
Under OS/390 batch, use the following:
mention(n) mention(n1,n2...)Any number of warning conditions can be specified.
object
(
-o filename
under USS)Under TSO, this option is specified as follows:
object(dsname)
OBJECT('''YOURLOG.PROJ4.OBJ(PART1)''')
Using
noobject
indicates that no object code is to be stored
by the compilation.
When neither
object
nor
noobject
is specified under TSO, the
default depends on how the source data set name is specified, as explained
here:
noobject
.
object
. (The
object data set name is determined by replacing the final CXX in the source
data set name with OBJ.)
Under TSO, if both
noobject
and
omd
are specified,
object code is generated but discarded after the OMD is run. See the SAS/C Compiler and Library User's Guide for a discussion of the
omd
option.
Under CMS, the
default is
object
. By default, object code is
generated in pass two of the compiler. If you specify
noobject
, pass
two is suppressed and object code is not generated. Under CMS, if both
noobject
and
omd
are specified, neither pass two nor the OMD is
run.
oldforscope
(
-Koldforscope
under
USS)for
statement will follow the old rules concerning scoping. The new
ANSI scoping rules specify that the scope of a variable defined in the
for
loop initialization clause
only includes the
for
statement
and its associated loop body. Therefore, the code in the following example
would not work under the new scoping rules:
for (int i=0; i < n; ++i) if ( f(i) ) break; if ( i < n ) // the 'i' declared in // the 'for' loop do_something(); // broke out of //the loop...
For compatibility with the C++ Standard, the
oldforscope
option is disabled by default.
optimize
(
-Koptimize
under USS)debug
option.
See the
optimize
option
in the SAS/C Compiler and Library User's Guide for details on
this option.
overload
(
-Koverload
under
USS)overload
C++
keyword. If this option is on, the translator recognizes the keyword syntax
as documented (for example, in Stroustrup's The C++ Programming Language,
Second Edition). The
overload
keyword is obsolete in modern C++. The
overload
keyword is treated as a reserved word only if the
overload
option
is turned on; it is treated as an identifier otherwise.
overstrike
(
-Koverstrike
under USS)pagesize
(
-Kpagesize=nn
under USS)pagesize
is specified as follows:
System | Syntax |
---|---|
OS/390 batch |
pagesize
(nn)
|
TSO |
pagesize
(nn)
|
CMS |
pagesize nn
|
nn lines per page of listing are printed at the
location determined by the
print
option. The default is 55 lines per page. (The default location is
different for each operating system and is described in the discussion of
print
.)
pflocal
(
-Kpflocal
under USS)_ _local
unless
_ _remote
is explicitly specified in the declaration. The default
is
nopflocal
.
posix
(
-Kposix
under USS)noposix
under TSO, CMS, and OS/390 batch and
--Kposix
under USS.
Specifically, the
posix
option has the following effects
on compilation:
_SASC_POSIX_SOURCE
is automatically defined.
refdef
is assumed if
norefdef
is
not also specified.
environ
and
tzname
are automatically treated as
_ _rent
unless declared as
_ _norent
.
Additionally, if any compilation in a program's main
load module is compiled with the
posix
option, it will have the following
effects on the execution of the program:
fopen
function assumes at run-time
that all filenames are HFS filenames unless prefixed by
"//"
.
system
function assumes at run-time
that the command string is a shell command unless prefixed by
"
//
"
.
tmpfile
and
tmpnam
functions
refer to HFS files in the
/tmp
directory.
Note that you should not use the
posix
translator
option when compiling functions that can be used by both POSIX and other applications
that are not POSIX.
Under USS and UNIX, use
-Kposix
.
For details about developing POSIX applications, see the SAS/C Compiler and Library User's Guide.
pponly
(
-P
under
USS)#include
files expanded. If the
pponly
option is used, all syntax
checking (except in preprocessor directives) is suppressed, no listing file
is produced, and no object code is generated. The preprocessor used by the
pponly
option is the C++ preprocessor, not the C preprocessor. These two
preprocessors are identical, except that the C++ preprocessor accepts C++
style comments as well as C style comments.
pponly(dsname)
where dsname indicates the name of a data
set in which the preprocessed source file is to be stored. If the library
belongs to another user, the fully qualified name of the data set must be
used and the name must be preceded and followed by three apostrophes because
of the CLIST language requirements. No final qualifier is assumed for a
pponly
data set.
Under CMS, use
pponly
. The output file is written
to a file with the same filename as the source file and a filetype of PP.
Under OS/390 batch, use
pponly
. The output file is written
to the data set allocated to the DDname SYSTROUT. Because the default SYSTROUT
data set is temporary, you should alter the SYSTROUT DD statement to refer
to a permanent file.
print
(
-Klisting[=filename]
under
USS)
Under OS/390 batch, the
print
option produces a listing file and sends it to SYSPRINT. The
listing file also includes error messages. If
noprint
is used, the listing file is suppressed. Under OS/390 batch,
the default is
print
.
In TSO, the
print
option is used with both the LCXX CLIST and the OMD370 CLIST
to specify where the listing file is to be stored.
If you specify the following, the listing file is printed at the terminal:
print (*)
If you use
print (*)
, you do not need to use the
term
compiler option. If you do, error messages are sent to the terminal
twice.
The following stores the listing file in the named data set:
print (dsname)This data set must be sequential; a partitioned data set member is not allowed. If the data set belongs to another user, the fully qualified name of the data set must be specified, and the name must be preceded and followed by three single quotes because of the CLIST language requirements. If the data set name is not specified within three quotes, it is assumed to be a data set with a final qualifier of LIST.
The following form specifies that no listing file is to be produced:
noprintIf you use
noprint
, the compiler ignores all other listing
options, such as
pagesize
and
ilist
. The
xref
option also is ignored.
If the source data set name is enclosed in single quotes,
the default is
noprint
.
Otherwise, the default is
print
. The listing data set name is determined by replacing the final CXX
in the source data set name with LIST and ignoring any member name specification.
You cannot specify
noprint
when you use the OMD370 CLIST.
If you do
not specify
print
when you use the OMD370 CLIST, the default is
print (*)
if the object data set name is enclosed
by single quotes. Otherwise, the listing data set name is determined by replacing
the final OBJ qualifier in the source data set name with LIST, and any member
name specification is ignored.
Under CMS,
print
spools the listing file to disk.
noprint
suppresses the listing file.
noprint
is an alternative to the
print
option. You can also give the
print
option
to the OMD370 EXEC.
Under USS, by default, no listing file is generated
unless you specify the
-Klisting
option. You can supply the name of the listing file by specifying
-Klisting=filename
.
If
-Klisting
is specified
without a filename, the listing is stored in an HFS file with a
.lst
extension. See the
object
option for a description of this
process.
rdepth
(
-Krdepth=n
under
USS)optimize
option.
See the
optimize
option
in the SAS/C Compiler and Library User's Guide for more details.
rdepth
is specified as follows:
System | Syntax |
---|---|
TSO |
rdepth(n)
|
CMS |
rdepth n
|
redef
(
-Kredef
under USS)#define
names.
refdef
(
-Krefdef
under USS)norefdef
, which specifies that the compiler use the
common model. Note that this option has meaning only when used in conjunction
with the
rent
or
rentext
options. When
norent
is used, the compiler always
uses the strict ref/def model; this cannot be overridden by the user.
rent
(
-Krent
under
USS)static
and external
data. If you use the
tronly
option (translate only) and use the
rent
option as well, be sure to specify the
rent
option at compile
time.
rentext
(
-Krentext
under USS)tronly
option (translate only) and use the
rentext
option as well, be sure to specify the
rentext
option at compile
time.
rtti
(
-Krtti
under
USS)
If your program uses the
dynamic_cast
or
typeid
operators, the
rtti
option must be specified for each compilation unit to assure the class objects
have the information required for dynamic type identification.
savec
#include
files expanded. Unless you use the
savec
option, the translator output is stored in a temporary data set and
is discarded after compilation.
savec(dsname)
where dsname indicates the name of a data
set in which the translated source file is to be stored. If the library belongs
to another user, the fully qualified name of the data set must be used, and
the name must be preceded and followed by three apostrophes because of the
CLIST language requirements. No final qualifier is assumed for a
savec
data set.
savec fileid
where fileid is any valid CMS filename.
Under CMS,
savec
must be the last option on the command line; the remainder of
the command line is interpreted as the fileid of the output file.
Under OS/390 batch, you cannot use the
savec
option.
The output file is, by default, written to the data set allocated to the DDname
SYSTROUT, which is normally a temporary data set. To override the default
SYSTROUT DD statement, use your own DD statement, specifying a permanent file.
Note:
If you compile the C source saved by the
savec
option with the SAS/C Compiler, you must
compile with the
cxx
compiler option, which informs the compiler
that it is compiling C code resulting from C++ translation.
size
optimize
option. See the
optimize
option in the SAS/C Compiler and Library User's Guide for details on this
option.
sname
(
-Ksname=sname
under USS)sname
used by the translator and compiler. The name cannot be longer
than seven characters. If name is longer than seven characters,
it is truncated. The name cannot contain any national characters and can contain
a dollar sign ($) only if you also specify the
dollars
option.
Each source file in a multisource file program should
be translated using a unique value for the
sname
option. CLINK detects duplicate
snames
and terminates the link
process. Usually, the default
sname
is sufficient to ensure uniqueness. For more information on
snames
, see the SAS/C Compiler
and Library User's Guide.
Under TSO and OS/390 batch, the specification is as follows:
sname(name)
where name defines the
sname
and is unique to this source file. If you
do not use the
sname
option,
the
sname
defaults to the
member name of the source file if it is a PDS member, or to NOSNAME otherwise.
Under CMS, the specification is as follows:
sname name
where name defines the
sname
and is unique to this source file. If you
do not use the
sname
option,
the
sname
defaults to the
filename of the source file.
source
(
-Ksource
under
USS)print
.)
nosource
suppresses only the source listing; the cross reference listing is
still printed if requested with the
xref
option.
The
source
option has no effect on the OMD listing if an OMD listing is requested.
Whether source code is merged into the OMD listing is controlled by the
merge
compiler option.
strict
(
-Kstrict
under
USS) stringdup
(
-Kstringdup
under USS) suppress
(
-wn
under USS)
Under TSO, specify the
suppress
option as follows:
suppress(n)
suppress('n1,n2,...')
suppress n suppress n1 n2 ...
Under OS/390 batch, use the following:
suppress(n) suppress(n1,n2 ...)
Any number of warning messages can be specified. If
both
suppress
and
enforce
specify the same message number, the warning
is enforced.
Note that
suppress
suppresses only translator
messages, not messages generated by the compiler.
time
optimize
option. See the
optimize
option in the
SAS/C Compiler and Library User's Guide for details on
this option.
tmplfunc
(
-Ktmplfunc
under
USS)-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.
trans
(
-Ktrans
under USS)
If you specify
notrans
, all
special characters are written out
as they appear in the source data.
trigraphs
(
-Ktrigraphs
under
USS) tronly
#include
files expanded. The normal
syntax and semantic analysis of the C++ code is performed, and warning or
error messages are emitted as appropriate.
tronly(dsname)
where dsname indicates the name of a data
set in which the translated source file is to be stored. If the library belongs
to another user, the fully qualified name of the data set must be used, and
the name must be preceded and followed by three apostrophes because of the
CLIST language requirements. No final qualifier is assumed for a
tronly
data
set.
Under TSO, the
tronly
,
pponly
, and
savec
options
are mutually exclusive.
Under CMS, use
tronly
. The output file is written
to a file with the same filename as the source file and a filetype of C.
Under OS/390 batch, use
tronly
. The output file is written
to the data set allocated to the DDname SYSTROUT. Because the default SYSTROUT
data set is temporary, you should alter the SYSTROUT DD statement to refer
to a permanent file.
Note:
If you compile the C source saved by the
tronly
option with the SAS/C Compiler, you must compile with the
cxx
compiler option, which informs the compiler
it is compiling C code resulting from C++ translation.
undef
(
-Kundef
under
USS)upper
(
-Kupper
under USS)upper
implies
overstrike
.
warn
(
-Kwarn
under
USS)nowarn
suppresses warning messages.
xref
(
-Kxref
under
USS) zapmin
(
-Kzapmin=n
under USS)zapmin(n)
where n refers to the number of bytes in the patch area. The default is 24 bytes.
zapmin n
where n refers to the number of bytes in the patch area. The default is 24 bytes.
For more information about the patch area, see the SAS/C Compiler and Library User's Guide. For more information
about
using the
zapmin
option, see the
zapmin
option in the SAS/C Compiler and Library User's Guide.
zapspace
(
-Kzapspace=n
under USS)Under OS/390 batch or TSO, use the following:
zapspace(factor)
zapspace factor
For more information about the patch area, see the SAS/C Compiler and Library User's Guide. For more information about
using the
zapspace
option,
see the
zapspace
option
in the SAS/C Compiler and Library User's Guide.
resident.h
header file with your C++
program, you must specify the
dollars
option.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.