Chapter Contents

Previous

Next
SAS/C Software: Changes and Enhancements, Release 6.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 6.50 and how they are implemented in various IBM mainframe environments (CMS, TSO, and MVS Batch).


New Options Summary

 New Options summarizes all the new compiler options for Release 6.50. This table is an extension of "Table 6.1 Compiler Options" in the SAS/C Compiler and Library User's Guide.

The first column lists the new digraph options in long form for the IBM 370. Capital letters indicate the abbreviation for the option. The second column indicates the default for each option. For the default value of the digraph option, you are referred to the description of the option later in the chapter. The third column indicates how the option is specified from the OpenEdition shell. The fourth column indicates whether the option can be negated. An exclamation point (!) means the option can be negated, and a plus sign (+) means it can not. The description of the digraph option identifies the negated form of the option. The next three columns represent the environment(s) for which an option is implemented. An asterisk (*) indicates the option affects this environment. The Affects Process column names the process that is affected by the option. The C in the Affects Process column indicates that compilation is affected by the option. An asterisk in the Sys column warns that the form or meaning of the option may differ depending on the environment in which the compiler is running.

Note:   Under MVS batch, the OpenEdition shell, and CMS, if you specify contradictory options, the option specified last is used.  [cautend]

New Options
Option

Name

Default OpenEdition Negation MVS Batch TSO CMS Affects

Process

Sys
AUtoinst NOAUtoinst -Kautoinst ! * * * C
DBGObj NODBGObj -Kdbgobj ! * * * C
DIgraph see description -Kdigraph[n] ! * * * C
RTti RTti -Krtti ! * * * C

 


New Options

     autoinst (  -Kautoinst under OpenEdition)
   The autoinst 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  autoinst 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.  [cautend]

    dbgobj (  -Kdbgobj under OpenEditon)
    The dbgobj option 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 autoinst option,  dbgobj is enabled automatically. 

By default, the dbgobj 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.  [cautend]

    digraph (  -Kdigraph under OpenEdition)
   Digraph options enable the translation of the International Standard Organization (ISO) digraphs and/or 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 diagraph 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 OpenEdition -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. SAS/C Release 6.50 currently supports the left column of pairs of primary and alternative sequences.

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

Note:   See Chapter 2, "Special Character Support", in the SAS/C Compiler and Library User's Guide for more information on digraphs.  [cautend]

  rtti (-Krtti under OpenEdition)
The rtti option 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 rtti option must be specified for each compilation unit to assure the class objects have the information required for dynamic type identification.



Compiler Option Clarification

    The SAS/C compile process is divided into several phases. Calls to each phase are normally controlled by a front-end command processor. These front-end processors accept what are referred to as long-form options. When invoking the various phases, the front-end processors convert the options applicable to each phase to a form referred to as short-form options. Each phase only accepts the short-form versions of its options.

Note:   Though short-form options may resemble the OpenEditon shell options, they are often different.  [cautend]

Note:   for more information on long-form and short-form compiler options, see "Compiling C Programs" in the SAS/C Compiler and Library User's Guide.  [cautend]


New External Compiler Variables

  Older versions of MVS were limited to running with 24-bit addresses, giving a maximum virtual address space of 16 megabytes. With the release of MVS/XA the addresses were increased to 31 bits giving a virtual address space maximum of 2 gigabytes. Certain portions of MVS (notably certain I/O subsystems) were not modified to accept 31-bit addresses, therefore programs wishing to utilize these services were forced to get storage below the 16M line to use as parameters when calling these functions. Prior versions of SAS/C allocated all stack memory from the area below the line to avoid the problems involved in calling old MVS services with 31-bit addresses.

In SAS/C Release 6.50, defining the external integer variable _stkabv in the source program (example:  extern int _stkabv = 1;) will indicate to the library to allocate stack space above the 16M line. 

Note:   Setting the variable at run time will have no effect; it must be initialized to 1 as shown.  [cautend]

However, some SAS/C library functions require their stack space be allocated below the line due to their use of auto storage for parameter lists and control blocks which still have a below-the-line requirement. These library routines have been identified, and either modified to remove the requirement, or changed to request that their own allocation of stack space be located below the 16M line. Release 6.50 includes a compiler option and a CENTRY macro parameter to allow user code to request that its stack space be allocated below the line even if the  _stkabv variable is defined as non-zero. 

  A new option allows the library to release stack space that is no longer needed. To free stack space, define the external integer variable _stkrels (example:  extern int _stkrels = 1;). This tells the library that, on return from a function, if an entire stack segment becomes unused, the segment should be returned to the operating system. This option is useful in long running programs that contain code paths that can occasionally become deeply nested, or in multi-tasking applications. Use of  _stkrels and  _stkabv guarantee that no stack space is allocated below the line if none is required by an executing routine.


Chapter Contents

Previous

Next

Top of Page

Copyright © Mon Mar 9 09:11:22 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.