![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS/C C++ Development System User's Guide, Release 6.50 |
The following list gives detailed descriptions of the options listed in Translator Options .
alias
(
-Kalias
under
OpenEdition)option in the SAS/C Compiler and Library User's Guide for details on this option. This option can only be used in conjunction with theoptimize
optimize
option. arlibarlib
is valid under TSO only and cannot be specified
together with the
object
option.
The
arlib
option is specified as follows:
arlib(dsname)
where dsname specifies the name of an AR370 archive. If the archive belongs to another user, you must specify the fully qualified name of the data set, and the name must be preceded and followed by three apostrophes, as in the following example:
arlib('''master.object.a''')
The extra apostrophes are required by the CLIST language. If the data set name is not enclosed within three apostrophes, it is assumed to be a data set with a final qualifier of 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.
at
(
-Kat
under OpenEdition)autoinst
(
-Kautoinst
under OpenEdition)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. ![[cautend]](../common/images/cautend.gif)
bitfield
(
-Kbitfield=n
under OpenEdition)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 MVS 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
This option cannot be negated.
bytealign
(
-Kbytealign
under
OpenEdition)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 OpenEdition)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 OpenEdition) dbgobj
(
-Kdbgobj
under OpenEdition) 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 OpenEdition)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 OpenEdition)Under MVS 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)
Here is an example:
define(USERDATA) define(TSO=1)
Under CMS, the specification is the following:
define symbol define symbol=value
Here are some examples:
define USERDATA define CMS=1
Under MVS batch, the
define
option is specified as follows:
define(symbol)
Here are some examples:
define(USERDATA) define(MYSYM=ABC)
depth
(
-Kdepth=n
under OpenEdition)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 |
|---|---|
| MVS batch | depth (n) |
| TSO | depth(n) |
| CMS | depth n |
digraph
(
-Kdigraph[n]
under OpenEdition)
| System | Syntax |
|---|---|
| MVS Batch | digraph(n) |
| TSO | digraph(n) |
| CMS | digraph n |
n
is between 0 and
3, inclusive. Specify
n
as follows:
| 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. This alone does not activate the new ISO digraphs. |
The default options are
.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 OpenEdition)$
character in identifiers, except
as the first character. (footnote 1) enforce
(
-w~n
under OpenEdition)Under TSO, specify the
enforce
option as follows:
enforce (n)
where n is the message number you want to enforce. If more than one warning message is to be enforced, specify each number in a comma-delimited list, enclosed by quotes, as follows:
enforce('n1,n2,...')
Under CMS, use the following:
enforce n enforce n1 n2 ...
Under MVS 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.
filesfiles(cxx)
In this case, some of the DDname replacements are as follows:
| Original | Replacement |
|---|---|
| SYSTROUT | CXXTROUT |
freg
(
-Kfreg=n
under OpenEdition)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 OpenEdition)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 OpenEdition)or#include <name.h>
#include <name>
hmulti
(
-Khmulti
under OpenEdition)hmulti
is the default. If
nohmulti
is used, then the translator
does not reinclude a header file specified within angle brackets.hxref
(
-Khxref
under OpenEdition)hlist
for a description of header files.ilist
(
-Kilist
under OpenEdition)#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 OpenEdition) imulti
is the default. If
noimulti
is used, then the translator
does not reinclude a header file specified within double quotes. indep
(
-Kindep
under
OpenEdition) inline
(
-Kinline
under
OpenEdition)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 OpenEdition)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 OpenEdition)#include
files. liblib
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
OpenEdition)lineno
is specified,
module size is increased because of the generation of line number and offset
tables.) loop
(
-Kloop
under OpenEdition)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 OpenEdition) membermember
is valid under TSO only. The
member
option is specified as follows:
member(member-name)
where member-name is a valid MVS 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 OpenEdition) suppress
option
as well.)
Under TSO, specify the
mention
option as follows:
mention(n)
where n is the number of the message associated with the warning condition. If more than one warning condition is to be mentioned, specify the numbers in a comma-delimited list, enclosed by quotes, as follows:
mention('n1,n2,...')
Under CMS, use the following:
mention n mention n1 n2 ...
Under MVS batch, use the following:
Any number of warning conditions can be specified.mention(n) mention(n1,n2...)
object
(
-o filename
under OpenEdition)Under TSO, this option is specified as follows:
object(dsname)
where dsname names the data set in which the compiler stores the object code. The data set name can be a PDS member. 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 apostrophes, as in the following example:
OBJECT('''YOURLOG.PROJ4.OBJ(PART1)''')
The extra apostrophes are required for the CLIST language. If the data set name is not specified within three apostrophes, it is assumed to be a data set with a final qualifier of OBJ.
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 OpenEdition)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 Release 6.50,
oldforscope
is the default for compatibility with previously written code.
optimize
(
-Koptimize
under
OpenEdition)debug
option. See the
optimize
option in the SAS/C Compiler
and Library User's Guide for details on this option. overload
(
-Koverload
under OpenEdition)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 OpenEdition)pagesize
(
-Kpagesize=nn
under OpenEdition)pagesize
is specified as follows:
| System | Syntax |
|---|---|
| MVS batch | pagesize (nn) |
| TSO | pagesize (nn) |
| CMS | pagesize nn |
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
OpenEdition)_ _local
unless
_ _remote
is explicitly specified in the declaration. The default is
nopflocal
.posix
(
-Kposix
under
OpenEdition)noposix
under TSO, CMS, and MVS batch and
-Kposix
under OpenEdition.
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 OpenEdition and UNIX, use
-Kposix
.
For details about developing POSIX applications, see the SAS/C Compiler and Library User's Guide.
pponly
(
-P
under OpenEdition)#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.
Under TSO, use the following:
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 MVS 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 OpenEdition)Under MVS 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 MVS 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:
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.print (dsname)
The following form specifies that no listing file is to be produced:
If you usenoprint
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 the printer.
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 OpenEdition, 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 OpenEdition)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 OpenEdition)#define
names. refdef
(
-Krefdef
under
OpenEdition)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 OpenEdition)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 OpenEdition)tronly
option (translate only) and use the
rentext
option as well, be sure to
specify the
rentext
option at compile time.rtti
(
-Krtti
under OpenEdition)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.
Under TSO, use the following:
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.
Under CMS, use
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 MVS 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. ![[cautend]](../common/images/cautend.gif)
sizeoptimize
option. See the
optimize
option in the SAS/C Compiler and Library User's Guide for details on this option. sname
(
-Ksname=sname
under OpenEdition)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 MVS 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 OpenEdition)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 OpenEdition) stringdup
(
-Kstringdup
under
OpenEdition) suppress
(
-wn
under OpenEdition)Under TSO, specify the
suppress
option as follows:
suppress(n)
where n is the number of the message associated with the warning condition. If more than one warning message is to be suppressed, specify the numbers in a comma-delimited list, enclosed by quotes, as follows:
suppress('n1,n2,...')
Under CMS, use the following:
suppress n suppress n1 n2 ...
Under MVS 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.
timeoptimize
option. See the
optimize
option in theSAS/C Compiler and Library User's Guide for details on this option.tmplfunc
(
-Ktmplfunc
under OpenEdition)trans
(
-Ktrans
under OpenEdition)
| Character | Listing File Representation |
|---|---|
| left brace | 0x8b
{ |
| right brace | 0x9b
} |
| left bracket | 0xad
[ |
| right bracket | 0xbd
] |
| not sign (exclusive or) | 0x5f
¬ |
| tilde | 0xa1
° (degree symbol) |
| backslash | 0xbe
|
| vertical bar (exclusive or) | 0x4f
| |
| pound sign | 0x7b
# |
| exclamation point | 0x5a
! |
notrans
, all special characters are written out as they appear in
the source data. trigraphs
(
-Ktrigraphs
under OpenEdition) 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.
Under TSO, use the following:
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 MVS 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. ![[cautend]](../common/images/cautend.gif)
undef
(
-Kundef
under
OpenEdition)upper
(
-Kupper
under
OpenEdition)upper
implies
overstrike
. warn
(
-Kwarn
under OpenEdition)nowarn
suppresses warning messages.xref
(
-Kxref
under OpenEdition) zapmin
(
-Kzapmin=n
under OpenEdition)zapmin(n)
where n refers to the number of bytes in the patch area. The default is 24 bytes.
Under CMS, use the following:
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 OpenEdition)Under MVS batch or TSO, use the following:
zapspace(factor)
Under CMS, use the following:
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.
dollars
option.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © Tue Feb 10 12:11:23 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.