Technical data
Cray Standard C/C++ Dialects [B]
• No warning is issued on duplicate size and sign specifiers, as shown in the
following example:
short short int i; // No warning in cfront mode
• Virtual function table pointer-update code is not generated in destructors for
base classes of classes without virtual functions, even if the base class virtual
functions might be overridden in a further derived class. For example:
struct A {
virtual void f() {}
A() {}
~A() {}
};
struct B : public A {
B() {}
~B() {f();} // Should call A::f according to ARM 12.7
};
struct C : public B {
void f() {}
}c;
In cfront compatibility mode, B::~B calls C::f.
• An extra comma is allowed after the last argument in an argument list. For
example:
f(1, 2, );
• A constant pointer-to-member function can be cast to a pointer-to-function, as
in the following example. A warning is issued.
struct A {int f();};
main () {
int (*p)();
p = (int (*)())A::f; // Okay, with warning
}
• Arguments of class types that allow bitwise copy construction but also
have destructors are passed by value like C structures, and the destructor
is not called on the copy. In normal mode, the class object is copied into a
temporary, the address of the temporary is passed as the argument, and
the destructor is called on the temporary after the call returns. Because the
argument is passed by value instead of by address, code like this compiled in
cfront mode is not calling-sequence compatible with the same code compiled
S–2179–36 169










