Chapter Contents

Previous

Next
Translator Options

Introduction

The translator accepts a number of options that enable you to alter the behavior of the translator. This chapter explains what options are available and how to specify them in each environment (CMS, TSO, OS/390 batch, and the UNIX System Services (USS) shell).

Remember that when you invoke the translator, first your C++ code is translated to C and is then compiled by the SAS/C Compiler. You can specify options when you invoke the translator. The syntax of specifying options in each of the supported environments is covered in Using the SAS/C C++ Development System under TSO, CMS, OS/390 Batch, and UNIX System Services. The translator inspects each of the options you specify and decides if it needs to act on that option. The only options that are acted upon by the translator are those with a T in the Affects column in Translator Options. Options without a T in this column are passed to the compiler at the compilation step. These options affect the C code output by the compiler. Some options are both acted upon by the translator and then also passed on to the compiler. These options have both a T and a C in the Affects column in Translator Options.


Which Options to Use

The translator accepts any compiler option described in the SAS/C Compiler and Library User's Guide, except for the cxx option, which is implied when you invoke the translator. Translator Options lists those options that are of special interest to C++ users, including the translator-specific options savec and tronly and those options whose behavior is slightly different when used with the translator (such as pponly ).

Note:    If you invoke the translator using a SAS/C Compiler option that is not documented in this book, you do not receive an error. However, some compiler options, such as listing options, apply only to the C code generated by the translator, not to your C++ code. Other compiler options are inappropriate for C++ and should not be used when translating and compiling a C++ program. For example, because C++ requires the presence of prototypes for all functions, the reqproto option is inappropriate. As another example, the japan option has no effect when used with C++.  [cautionend]

Listing options

Beginning with Release 6.50, the translator generates a listing of the C++ source code. By default, source listing, options listings, and so on are produced. That is, the defaults for C++ are print , options , source , and noxref . You can use all of the listing options accepted by the SAS/C Compiler with the translator.

You can combine listing options such as ilist and maclist with options that prevent compilation such as tronly and pponly . Because the listing options are completely documented in the SAS/C Compiler and Library User's Guide, that information is not repeated here.


Options that Affect Warning and Error Messages

The translator performs the majority of the diagnostic work. Therefore, any options such as enforce and suppress that control how messages are generated apply to messages generated by the translator, not the compiler.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.