Technical data
Cray Standard C/C++ Dialects [B]
to const int **). Comparisons and pointer difference of such pairs of
pointer types are also allowed.
• In operations on pointers, a pointer to void is always implicitly converted
to another type if necessary, and a null pointer constant is always implicitly
converted to a null pointer of the right type if necessary. In ANSI C, these are
allowed by some operators, and not by others (generally, where it does not
make sense).
• Pointers to different function types may be assigned or compared for equality
(==) or inequality (!=) without an explicit type cast. This extension is not
allowed in C++ mode.
• A pointer to void can be implicitly converted to or from a pointer to a
function type.
• External entities declared in other scopes are visible:
void f1(void) { extern void f(); }
void f2() { f(); /* Using out of scope declaration */ }
• In C mode, end-of-line comments (//) are supported.
• A non-lvalue array expression is converted to a pointer to the first element of
the array when it is subscripted or similarly used.
• The fortran keyword. For more information, see Section 5.2, page 106.
• Cray hexadecimal floating point constants. For more information, see Section
5.3, page 106.
B.5 C++ Extensions Accepted in cfront Compatibility Mode
The cfront compatibility mode is enabled by the -h cfront command-line
option. The following extensions are accepted in cfront compatibility mode:
• Type qualifiers on the this parameter are dropped in contexts such as in the
following example:
struct A {
void f() const;
};
void (A::*fp)() = &A::f;
This is a safe operation. A pointer to a const function can be put into a
pointer to non-const, because a call using the pointer is permitted to modify
S–2179–36 165










