Technical data
Cray Standard C/C++ Dialects [B]
This appendix details the features of the C and C++ languages that are accepted
by the Cray Standard C/C++ compilers, including certain language dialects and
anachronisms. Users should be aware of these details, especially users who are
porting codes from other environments.
B.1 C++ Conformance
The Cray Standard C++ compiler accepts the C++ language as defined by the
ISO/IEC 14882:1998 standard, with the exceptions listed in Section B.1.2, page 160.
The Cray Standard C++ compiler also has a cfront compatibility mode, which
duplicates a number of features and bugs of cfront. Complete compatibility is not
guaranteed or intended. The mode allows programmers who have used cfront
features to continue to compile their existing code (see Section 3.5, page 48).
Command line options are also available to enable and disable anachronisms (see
Section B.2, page 161) and strict standard-conformance checking (see Section B.3,
page 162, and Section B.4, page 163). The command line options are described
in Chapter 2, page 3.
B.1.1 Supported Features
The following features, which are in the ISO/IEC 14882:1998 standard but not
in traditional C++:
1
• The dependent statement of an if, while, do-while,orfor is considered
to be a scope, and the restriction on having such a dependent statement be
a declaration is removed.
• The expression tested in an if, while, do-while,orfor, as the first
operand of a ? operator, or as an operand of the &&, ||,or! operators may
have a pointer-to-member type or a class type that can be converted to a
pointer-to-member type in addition to the scalar cases permitted by the ARM.
• Qualified names are allowed in elaborated type specifiers.
• A global-scope qualifier is allowed in member references of the form
x.::A::B and p->::A::B.
1
As defined in The Annotated C++ Reference Manual (ARM), by Ellis and Stroustrup, Addison Wesley, 1990.
S–2179–36 157










