Language Options > C++ tab

(Builder: Project > Language Options for Selected Files... > C++ tab)

The following are descriptions of the drop-down list boxes in the C++ tab.

C++ version (drop-down list)

Standard C++

Enables ANSI C++ mode. Warning messages are issued when non-ANSI C++ features are used. Features that conflict with ANSI C or C++ are disabled. Equivalent to the --std command line option.

ARM

Accepts the C++ language as defined by The Annotated C++ Reference Manual (ARM), by Ellis and Stroustrup. This version of C++ includes templates, exception handling, which must be explicitly requested, and the anachronism of the book's Chapter 18. This is essentially the same language as the language reference manual for cfront 3.0, with the addition of exception handling. This is the default C++ version.

ESTL C++

Enables the extended embedded C++ dialect. Equivalent to the --ee command line option

Embedded C++

Enables the Embedded C++ dialect, with templates, STL, namespaces, and mutable, new-style casts. Equivalent to the --e command line option.

Cfront 3.0

Enables compatibility with cfront version 3.0. This causes language constructs to be accepted which are not necessarily part of the C++ language definition, but which are accepted by the AT&T C++ Language System (cfront) release 3.0. This mode also enables acceptance of anachronisms.

Cfront 2.1

Enables compatibility with cfront version 2.1. This causes language constructs to be accepted which are not necessarily part of the C++ language definition, but which are accepted by the AT&T C++ Language System (cfront) release 2.1. This mode also enables acceptance of anachronisms.

C++ Library (drop-down list)

C++ Library Option Command
Standard C++ library with exceptions.
--stdle
Standard C++ library without exceptions.
--stdl
Extended Embedded C++ library with exceptions.
--eele
Extended Embedded C++ library without exceptions.
--eel
Embedded C++ library without exceptions.
--el
Embedded C++ library with exceptions.
--ele
cfront version 2.1 compatibility with compilation of C++. This causes the compiler to accept language constructs that, while not part of the C++ language definition, are accepted by the AT&T C++ Language System (cfront) release 2.1.
--cfront_2.1
-2.1

cfront version 3.0 compatibility with compilation of C++. This causes the compiler to accept language constructs that, while not part of the C++ language definition, are accepted by the AT&T C++ Language System (cfront) release 3.0. This option also enables acceptance of anachronisms.
--cfront_3.0
-3.0

Minimum Runtime Support Library
--minl

Inlining (drop-down list)

Selects whether function inlining should be done.

Max inlining

Enables maximum inlining of function calls.

Max inlining unless debug

Disables maximum inlining of function calls when debugging information is requested.

Inlining

Enables minimal inlining of function calls.

Inlining unless debug

Disables inlining of function calls when debugging information is also requested.

No inlining

Disables inlining of function calls.

Virtual tables (drop-down list)

Controls the allocation of virtual tables.

Standard Allocation

Uses the standard heuristic to define a virtual function table for a class. The virtual function table for a class is defined in a compilation if that compilation contains a definition of the first non-inline pure virtual function for the class. For classes that contain no such function, the default behavior defines the virtual function table as a local static entity.

Force Allocation

Forces definition of virtual functions tables in cases where the heuristic used by the front end, to decide on the definition of virtual tables, provides no guidance.

Suppress Allocation

Suppresses definition of virtual function tables in cases where the heuristic used by the front end, to decide on the definition of virtual function tables, provides no guidance. For details on this heuristic, see Standard Tables above. The option suppresses definition of the local static virtual function tables.

Type of enum (drop-down list)

Selects the algorithm to allocate storage for enumeration types.

Int

Always allocates a full integer for an enumeration type. This is the default.

Smallest possible

Allocates enumerations to the smallest possible integral type.

Packing (drop-down list)

Selects the default alignment for packing classes and structs. This option is rarely used, and should match the alignment setting in the Project > Options for Selected Files... dialog box, Advanced tab.

The following items describe check box items in the Language Options dialog box, C++ tab:

Enable exception handling

Enables support for the C++ exception handling feature. Code size and speed may be impacted even when exception handling is not directly used.

Disable namespaces

Disables support for the C++ namespaces feature.

Enable std namespace

Enables implicit use of the standard namespace when standard header files are included.

Disable RTTI

Disables support for runtime type information (RTTI) features "dynamic_cast" and "typeid."

Disable "bool" keyword

Disables recognition of the "bool" keyword. Equivalent to omitting the --bool command line option.

Disable "explicit" keyword

Disables support for the "explicit" specifier on constructor declarations. It is equivalent to the --no_explicit build-time option.

Disable wchar_t keyword

Does not recognize wchar_t as a keyword. Use this option if your source contains a typedef that declares wchar_t.

Disable array new/delete

Disables support for the array new and delete feature.

Recognize "restrict" keyword

Enables recognition of the "restrict" keyword.

Disable "extern inline"

Disable support for 'inline' functions with external linkage in C++. Functions which are declared only 'inline' will be external or static depending on the flag specified. Equivalent to the --no_extern_inline command line option.

Disable 'extern "C"' type conversion

Disable an extension to permit implicit type conversion in C++ between a pointer to an `extern "C"' function and a pointer to an `extern "C++"' function. Equivalent to the --no_implicit_extern_c_type_conversion command line option.

C and C++ functions have distinct types

Function types are considered distinct if their only difference is that one has `extern "C"' routine linkage and the other has `extern "C++"' routine linkage. Equivalent to the --c_and_cpp_functions_are_distinct command line option.

Allow overloading of enum types

Allow operator functions to overload built-in operations on enum-typed operands.

Use late tiebreaker rules

When resolving an overloaded function, tie-breakers (`const' and `volatile' qualifiers) are ignored during the initial comparison. They are considered only if the two functions are otherwise equally good on all arguments. Equivalent to the --late_tiebreaker command line option.

Force zero initialization of scalars

Force all uninitialized scalar global variables to be explicitly initialized to zero. Equivalent to the --force_zero_initialization command line option.

No constructor initialization in main

Do not generate an automatic call to _main from main. _main performs constructor initialization

Enable multibyte characters

Enable processing for multibyte character sequences in comments, string literals, and character constants. Equivalent to --multibyte_chars.

Enable Microsoft extensions

Enables recognition of a set of Microsoft extensions. The Green Hills C++ User's Guide discusses this in further detail.

Allow anachronisms

Enables support of anachronisms.

Use old for-loop initialization scoping

The old (Cfront-compatible) scoping rules means the declaration of a variable in the initialization part of a for statement is in the scope to which the for statement itself belongs. The new (standard conforming) rules, in effect, wrap the entire for statement in its own implicitly generated scope.

Don't demangle linker messages

Does not demangle names that appear in linker messages. These are typically symbol names which are either undefined or multiply defined.

Leave translated C

Leaves a C version of the C++ code. The translated C file is filename.ic.

Keep comments in preprocessor output

If producing a preprocessor output file (see File Options dialog box, Actions tab) passes comment lines through from the C++ source to the preprocessor output file.

Ignore duplicate #include

Ignores an #include directive if attempting to include a file already included. The file must appear with exactly the same name in both #include directives to ignore the second #include directive.

If a filename appears in more than one #include directive during a single compilation, it skips all of the directives except the first one. Equivalent to the -includeonce C preprocessor option.

Consider char to be signed

The "char" type is treated as "signed char."

Consider bit-fields to be signed

Bit fields within a struct or class are treated as signed entities by default.

Consider enum bit-fields to be signed

Bit fields of type "enum" within a struct or class are treated as signed entities by default.

Use long lifetimes for temps

Creates temporary variables whose lifetime ends at the earliest end of scope, end of switch clause, or next label. This is the behavior of cfront. Long lifetime temporaries are implied by the cfront compatibility modes. The alternative is for temporary variable lifetimes to end at the end of the full expression for which they are created. This is the behavior of standard C++.

Recognize alternate tokens

Enables recognition of alternative tokens. These are tokens that make it possible to write C++ without the use of the {, }, [, ], #, &, |, ^ and ~ characters. The alternative tokens include the operator keywords, such as and and bitand, and digraphs.


Previous

Next



Copyright © 1999, Green Hills Software. All rights reserved.