The following section describes known class issues and unimplemented or unsupported features.
Usually, using elaborate type specifiers ensures the validity of both names when you define a class and a function with the same name in the same scope. However, in the RS08 compilers this type of class name definition causes an error. Example:
class C { char c; }; void C(int x) { } int x; void main() { C(x); ------^----------------------- ERROR }
void f(void) { class C { C() { } }; }
class X { public: enum E { a, b, c }; } x; int type(int ) {return INT;} int type(long ) {return LONG;} int type(char ) {return CHAR;} int type(X::E ) {return ENUMX;} type(x.a); ----------^---------------- Ambiguous parameters type
struct :: A a; -------------------^----------------ERROR
void f (){ class A{ int g(); ---------------^------Illegal local function definition }; }
template <class T> struct A { void f(); }; template <class T> void A<T>::f(){ class B { T x; }; -------------^----------------ERROR }
Declaring the name of a class does not ensure that the scope name extends through the declarative regions of classes nested within the first class. Example:
struct X4 { enum {i = 4}; struct Y4 { int ar[i]; ---------------^-------------------ERROR } }
Normally, C++ allows taking the address of an object declared register. Example:
register int a; int* ab = &a; ----------^----- ERROR: Cannot take address of this object