Chapter Contents |
Previous |
Next |
SAS/C Compiler Changes in Release 7.50 |
New Compiler Options |
The SAS/C Compiler accepts a number of options enabling you to alter
the way code is generated, the way listing files appear, as well as other
aspects of the compilation. This section describes the new compiler options
available with Release 7.50 and how they are implemented in various IBM operating
systems.
The following table contains the long and short forms of the new compiler options. This table is an extension of the table labeled, "Compiler Option Equivalents," in Chapter 5, "Compiling C Programs."
Long Form | Short Form |
---|---|
archlevel (1*) |
-ar l* |
asynsig |
-asy |
bfp |
-mi |
coverage |
-ec |
c99subset |
-c9 |
hugeptrs |
-mh |
mpsafe |
-mp |
stkbelow |
-mb |
* Where l is one of the letters
a
, b
, c
,
or d
.
The following table summarizes all the new compiler options. This table is an extension of the table labeled, "Compiler Options" in Chapter 6, "Compiler Options."
Note: If you specify
contradictory options under MVS batch, the OpenEdition shell, and CMS, the
option specified last is used.
OptionName | Default | USS | Negation | OS/390 Batch | TSO | CMS | Affects Process | Sys |
---|---|---|---|---|---|---|---|---|
ARChlevel |
see description |
-Karchlevel=let |
+ | * | * | * | C | |
ASYnsig |
ASYnsig |
-Kasynsig |
! | * | * | * | C | |
BFp |
NOBFp |
-Kbfp |
! | * | * | * | C | |
COVerage |
NOCOVerage |
-Kcoverage |
! | * | * | * | C | |
C99Subset |
NOC99Subset |
-Kc99subset |
! | * | * | * | C | |
HUgeptrs |
NOHUgeptrs |
-Khugeptrs |
! | * | * | * | C | |
MPsafe |
MPsafe |
-Kmpsafe |
! | * | * | * | C | |
STKbelow |
NOSTKbelow |
-Kstkbelow |
! | * | * | * | C | |
STMap |
STMap |
-Kstmap |
! | * | * | * |
archlevel
(-Karchlevel=let
under USS)The archlevel
option specifies an architectural
level by a single-letter code. Four codes are supported currently, with the
following meanings.
a |
The processor supports the logical
string assist facility. This facility allows the compiler
to generate better code for string.h built-in
functions such as strlen , strcpy , and
strcmp . |
b |
The processor supports the immediate and relative instruction set, as well as the compare and move extended facility. This allows the compiler to generate improved code in many areas. |
c |
The processor supports the floating-point extensions
feature. This feature allows the compiler to generate improved code for floating-point
computations, and is required to use IEEE floating-point. Note that use of archlevel(c) is advantageous for programs which use the traditional
390 hex format for floating-point as well as for IEEE applications. |
d |
The processor supports the z/Architecture. This feature allows the compiler to exploit 64-bit registers for programs which use the long long data type, and is a prerequisite for 64-bit addressing support. |
Note: The codes are cumulative so that, for instance, specifying
an architecture level of c
indicates presence
of all features defined for levels a
and b
,as well as c
.
If no architecture level
is specified, the compiler assumes that none
of the above architectural features can be used. However, if the bfp
option is specified, an archlevel
of c
is assumed by default, and if the hugeptrs
option is specified, the archlevel
is assumed to be
d
.
In TSO and under MVS batch, the archlevel option is specified as follows:
archlevel(let)
For example, the following indicates that the compiler can assume the presence of the floating-point extensions:
archlevel(c)
asynsig
(-Kasynsig
under USS)noasynsig
.
If noasynsig
is specified but the program
responds to asynchronous signals, detection of these signals by the program
may be delayed, which causes the handler to be called later than otherwise
would be expected.
bfp
(-Kbfp
under USS)BFP
option implies the ARCHLEVEL(C)
option.
coverage
(-Kcoverage
under USS)coverage
option requires the user to provide
a _ _cvgtrm
routine to output the accumulated
coverage data.
c99subset
(-Kc99subset
under USS)
4000000000
is a 64-bit signed integer instead of a 32-bit unsigned integer.
_ _func_ _
is made available for each
function. When it is referenced, _ _func_ _
is treated as if it were declared
at the beginning of the function, for example:
static const char __func__[] = "function-name";If the identifier is not used, the declaration will be deleted and no space will be wasted.
#define LOGIT(...) fprintf(logfile, _ _VA_ARGS_ _) LOGIT("x was %d, but y was %d", x, y);
inline
is a keyword. This is equivalent
to the SAS/C _ _inline
keyword except
for the following:
restrict
is a keyword. The optimizer
does not use the information provided by the use of this qualifier; consequently,
its use will not result in better code generation. The keyword is enabled
as a convenience for porting code written for C99 to SAS/C.
hugeptrs
(-Khugeptrs
under USS)hugeptrs
is specified,
the default pointer type is _ _huge
,
and the size of signed and unsigned long data is 8 bytes. Note that the hugeptrs
option implies the ARCHLEVEL(D)
option.
Though the hugeptrs
option is valid under
CMS, the object code generated with this option cannot be executed under CMS
because of operating system limitations.
mpsafe
(-Kmpsafe
under USS)mpsafe
causes
a slight performance penalty in the function epilog, so it should be used
only when the object code may be used in the presence of such asynchronous
signals.
If nompsafe
is specified or defaulted,
an asynchronous signal generated on another processor may be ignored or may
cause an ABEND if it occurs while the function is returning.
stkbelow
(-Kstkbelow
under USS)_stkabv
external variable
has been set to indicate the the program wants to have the stack above the
line, but certain functions cannot tolerate this (for example, stack variables
will be passed to system services that run only AMODE=24), then stkbelow
can be specified to force the auto
variables of such functions
to be allocated below the line.
For assembler routines, the STKBELOW=YES
option
of the CENTRY macro will accomplish the same result. For best results, use stkbelow
to compile only those functions that require a stack
below the line.
STMap
(-Kstmap
under USS-Kstmap
option implies the -Kxref
option.
The following table contains the new option names, symbols, and corresponding values for those new options that are assigned preprocessor symbols by the compiler. This table is an extension of the table labeled "Preprocessor Symbols" in Chapter 6, "Compiler Options."
Option | Symbol | Value |
---|---|---|
archlevel unspecified |
_O_ARCHLEVEL |
0 |
archlevel(a) |
_O_ARCHLEVEL |
1 |
archlevel(b) |
_O_ARCHLEVEL |
2 |
archlevel(c) |
_O_ARCHLEVEL |
3 |
archlevel(d) |
_O_ARCHLEVEL |
4 |
bfp
|
_O_BFP
|
1 |
nobfp
|
_O_BFP
|
0 |
c99subset
|
_O_C99SUBSET
|
1 |
noc99subset
|
_O_C99SUBSET
|
0 |
hugeptrs
|
_O_HUGEPTRS
|
1 |
nohugeptrs
|
_O_HUGEPTRS
|
0 |
New COOL Options |
The following table contains the long and short forms of the new compiler options. This table is an extension of the table labeled, "COOL Options Equivalents," in Chapter 7, "Linking C Programs."
Long Form | Short Form |
---|---|
coverage |
none |
severe |
-we |
The following table lists the new options available for the COOL utility and the systems to which these options apply. This table is an extension of the table labeled, "COOL Options," in Chapter 7, "Linking C Programs."
OptionName | TSO | CMS | OS/390Batch | USS |
---|---|---|---|---|
coverage |
X | X | X | X |
severe |
X | X | X | X |
coverage
(-Kcoverage
under USS)coverage
option requires the user to provide
a _ _cvgtrm
routine to output the accumulated
coverage data.
severe
(-Asevere
under USS)
New DSECT2C Options |
In Appendix 1, "The DSECT2C Utility," add the following options to the table labeled, "DSECT2C Options."
Option | Explanation |
---|---|
-mh |
DSECT2C generates output that explicitly specifies the _ _near qualifier when declaring object pointer types.
This allows such types to be compiled correctly without depending on the setting
of the HUGEPTRS compiler option. The _ _huge keyword is always used for 64-bit pointer types. |
-mi |
DSECT2C generates output that explicitly specifies the _ _hexfmt keyword on floating point types. This allows
such types to be compiled correctly when the BFP compile option is specified.
The _ _binfmt keyword is always used
for binary floating-point types. |
New Run-Time Option |
The run-time option, =rsntrace
is new
for Release 7.50. Add the following information for =rsntrace
to Chapter 9, "Run-Time Argument Processing."
Add the following entry to the table labeled, "General Run-Time Options:"
option | negation | int _options | int _negopts |
---|---|---|---|
=rsntrace |
=norsntrace |
_RSNTRACE |
_NORSNTRACE |
Add the following entry to the list of options that follows the table labeled, "General Run-Time Options:"
=rsntrace
=r
=rsntrace
is specified, whenever a library diagnostic message is printed, the library's
system macro information (see the
SAS/C Library Reference, Volume 1) is checked to see whether a system
macro failure has been recorded. If so, information about the failure is added
to the message. It is possible that the failure is not related to the contents
of the message; however, in many cases it will be, and the additional information
may be helpful in problem determination. In particular, this option can be
useful in debugging applications such as socket programs, which are often
sensitive to configuration problems that manifest themselves as unusual or
misleading failure conditions.
In the section titled, "Program specification," add the following entry to the list of currently implemented options:
_RSNTRACE |
annotates library messages with system macro information. |
In the section titled, "Program specification," add the
following entry to the list of currently implemented options for _negopts
:
_NORSNTRACE |
does not annotate library messages with system macro information. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.