- Unsupported data
types include:
- bool
- wchar_t (wide character).
- Exception h
andling is unsupported
- Using comma e
xpressions as lvalues is unsupported. Example:
(a=7, b) = 10;
- Name Features
- Namespaces
are currently unsupported. Example:
Listing: Example - Namespaces
namespace A {
----------^------------------- ERROR
int f(int x);
}
- The name lookup
feature is currently unsupported. Name lookup is defined as looking up a class as if the name is used in a member function of X when the name is used in the definition of a static data member of the class. Example:
Listing: Example - Name Lookup Feature
class C {
public:
static int i;
static struct S {
int i; char c;
} s;
};
int C::i = s.i;
- Hiding a class name or enumeration name using the name of an object, function, or enumerator declared in the same scope is unsupported. Example:
Listing: Example - Enumerator Declaration
enum {one=1, two, hidden_name };
struct hidden_name{int x;};
-----------^----------------Not allowed
- Global initializers with non-const variables are unsupported. Example:
Listing: Example - Global Initializers
int x;
int y = x;
- Anonymous
unions are unsupported. Example:
Listing: Example - Anonymous Unions
void f()
{
union { int x; double y; };
x = 1;
y = 1.0;
}
- The following time functions (<ctime>) are unsupported:
- time()
- localtime()
- strftime()
- ctime()
- gmtime()
- mktime()
- clock()
- asctime()
- The fundamental type feature is not supported:
Listing: Example - Fundamental Type Feature
int fun (char x){}
int fun (unsigned char x){}
--------------^--------------------------Illegal function redefinition
- Enumeration declaration features
- Defining an enum in a local scope of the same name is unsupported. Example:
Listing: Example - Unsupported Enumeration Declaration
enum e { gwiz }; // global enum e
void f()
{
enum e { lwiz };
---------------^---------------- ERROR: Illegal enum redeclaration
}
- The identifiers in an enumerator-list declared as constants, and appearing wherever constants are required, is unsupported. Example:
Listing: Example 2 - Unsupported Enumeration Declaration
int fun(short l) { return 0; }
int fun(const int l) { return 1; }
enum E { x, y };
fun(x); /*should be 1*/
- Unsupported union features:
- The following multiple base definition features are unimplemented as yet:
- More than one indirect base class for a derived class. Example:
Listing: Example - Multiple Base Definition
Class B:public A(){};
Class C: public B(){};
Class D :public B, public A,publicC{};
- Multiple virtual base classes. Example:
Listing: Example - Multiple Virtual Base
class A{};
class B: public virtual A{};
class C: public virtual A{};
class D: public B, public C{}
- Generally, a friend function defined in a class is in the scope of the class in which it is defined. However, this feature is unsupported at this time. Example:
Listing: Example - Unsupported Friend Function
class A{
public:
static int b;
int f(){return b;};
};
int A::b = 1;
int x = f(); /*ERROR : x!=1 (it should be 1)*/
- The compiler considers the following types ambiguous (the same):
- char
- unsigned char
- signed char
- The Call to Named Function feature is unsupported. Example:
Listing: Example - Call to Named Function
class A{
static int f(){return 0;}
friend void call_f(){
f();
------^-----ERROR: missing prototype (it should be accepted
by the compiler)
}
}
- Preprocessing directives are unsupported. Example:
Listing: Example - Preprocessing Directives
#define MACRO (X) 1+ X
MACRO(1) + 1;
-------------^-------------------Illegal cast-operation
- The following line control feature is unsupported.
- The following floating point characteristics errors occur:
- Float exponent is inconsistent with minimum
power(FLT_RADIX, FLT_MIN_EXP -1) != FLT_MIN
- Float largest radix power is incorrect
FLT_MAX / FLT_RADIX + power(FLT_RADIX, FLT_MAX_EXP-FLT_MANT_DIG-1)!= power(FLT_RADIX,FLT_MAX_EXP-1)
- Multiplying then dividing by radix is inexact
- Dividing then multiplying by radix is inexact
- Double exponent is inconsistent with minimum
- Double, power of radix is too small
- Double largest radix power is incorrect
- Multiplying then dividing by radix is inexact
- Dividing then multiplying by radix is inexact
- Long double exponent is inconsistent with minimum
- Long double, power of radix is too small
- Long double largest radix power is incorrect
- The following best viable function is unsupported:
- When two viable functions are indistinguishable implicit conversion sequences, it is normal for the overload resolution to prefer a non-template function over a template function. Example:
Listing: Example - Viable Function
int f ( short , int ) { return 1; }
template <class T> int f(char, T) { return 2; }
value = f(1, 2);
---------^----------------------ERROR: Ambiguous
- The following Reference features are unsupported:
- Object created and initialized/destroyed when reference is to a const. Example:
Listing: Example - Reference
const X& r = 4;
-----------------------^------------ERROR: Illegal cast-operation
- The following syntax is unsupported:
Listing: Example - Unsupported Syntax
int a7, a;
if(&(::a7) == &a);
---------^-------------------ERROR:Not supported operator ::
- Aggregate features
- Object initialization fails. Example:
Listing: Example - Unsupported Object Initialization
class complex{
float re, im;
complex(float r, float i = 0) { re=r; im=i; };
int operator!=( complex x ){}
}
complex z = 1;
z!=1
---------^------------ERROR :Type mismatch
- Initialization of aggregate with an object of a struct/class publicly derived from the aggregate fails. Example:
Listing: Example 2 - Unsupported Object Initialization
class A {
public:
int a;
A(int);
};
class B: public A{
public:
int b;
B(int, int);
};
B::B(int c, int d) : A(d) { b = c; }
B b_obj(1, 2);
int x = B_obj.a;
-----^----------ERROR: x should be 2
- Evaluating default arguments at each point of call is an unsupported feature.
- The following typedef specifier is unsupported:
Listing: Example - Unsupported typedef Specifier
typedef int new_type;
typedef int new_type;
--------------^-------ERROR: Invalid redeclaration of new_type
- This return statement causes an error:
Listing: Example - Unsupported Return Statement
return ((void) 1);
----------------------------^------------ERROR
- Permitting a function to appear in an integral constant if it appears in a sizeof expression is unsupported. Example:
Listing: Example - Unsupported Expression
void f() {}
int i[sizeof &f];
--------------------^-------------ERROR
- Defining a local scope using a compound statement is an unimplemented feature. Example:
Listing: Example - Local Scope
int i = 4;
int main(){
if ((i != 1) || (::i != 4));
------------------------^----------ERROR
}
- The following Main function is currently unimplemented:
Listing: Example - Unimplemented Main Function
argv[argc]!=0 (it should be guaranteed that argv[argc]==0.)
- The following Object lifetime feature is currently unimplemented:
- When the lifetime of an object ends and a new object is created at the same location before it is released, a pointer that pointed to the original object can be used to manipulate the new object.
- The following Function call features are unsupported:
- References to functions feature is not supported. Example:
Listing: Example - Unsupported Function Call
int main(){
int f(void);
int (&fr)(void) = f;/
}
- Return pointer type of a function make ambiguous between void * and X *. Example:
Listing: Example 2 - Unsupported Function Call
class X {
public:
X *f() { return this; }
};
int type(void *x) {return VOIDP;}
int type(X *x) {return CXP;}
X x;
type(x.f())
-----^--------ERROR: ambiguous
- Incorrect implementation of a member function call when the call is a conditional expression followed by argument list. Example:
Listing: Example 3 - Unsupported Function Call
struct S {
S(){}
int f() { return 0; }
int g() { return 11; }
int h() {
return (this->*((0?(&S::f) : (&S::g))))();
------------------------------^-------------ERROR
}
};
- The following Enumeration feature is unsupported:
- For enumerators and objects of enumeration type, if an int can represent all the values of the underlying type, the value is converted to an int; otherwise if an unsigned int can represent all the values, the value is converted to an unsigned int; otherwise if a long can represent all the values, the value is converted to a long; otherwise it is converted to unsigned long. Example:
Listing: Example - Unsupported Enumeration
enum E { i=INT_MAX, ui=UINT_MAX , l=LONG_MAX, ul=ULONG_MAX };
-------------------------^--------------ERROR: Integral type expected
or enum value out of range
- Delete operations have the following restrictions:
- Use the S::operator delete only for single cell deletion and not array deletion. For array deletion, use the global ::delete(). Example:
Listing: Example - Restrictions for Delete Operation
struct S{
S() {}
~S () {destruct_counter++;}
void * operator new (size_t size) {
return new char[size];
}
void operator delete (void * p) {
delete_counter ++;
::delete p;}
};
S * ps = new S[3];
delete [] ps;
-------------^--------ERROR: Used delete operator (should use global
::delete)
- Global ::delete uses the class destructor once for each cell of an array of class objects. Example:
Listing: Example 2 - Restrictions for Delete Operation
S * ps1 = new S[5];
::delete [] ps1;
------------^------ERROR: ~S is not used
- Error at declaring delete operator. Example:
Listing: Example 3 - Restrictions for Delete Operation
void operator delete[](void *p){};
-----------------------^--------------ERROR
- The New operator is unimplemented. Example:
Listing: Example - Unimplemented New Operator
- void * operator new[](size_t);
-------------------^--------ERROR: Operator must be a function
- The following Expression fails to initialize the object. Example:
Listing: Example - Failed Initialization of the Object
int *p = new int(1+(2*4)-3);
-----------------^-----ERROR: The object is not initialized
- Use placement syntax for new int objects. Example:
Listing: Example - Using Placement Syntax for New int Objects
int * p1, *p2;
p1 = new int;
p2 = new (p1) int;
--------------^----------------ERROR: Too many arguments
- The following Multi-dimensional array syntax is not supported:
Listing: Example 7 - Unsupported Multi-dimensional Array Syntax
int tab[2][3];
int fun(int (*tab)[3]);
-------------------^---------------------ERROR
- The following Goto syntax is unsupported:
Listing: Example - Unsupported Goto Syntax
label:
int x = 0;
--------------^---------------ERROR: x not declared (or typename)
- The following Declaration Statement feature is not implemented:
- Transfer out of a loop, out of a block, or past an initialized auto variable involves the destruction of auto variables declared at the point transferred from but not at the point transferred to.
- The following Function Syntax features are not supported:
- Function taking an argument and returning a pointer to a function that takes an integer argument and returns an integer should be accepted. Example:
Listing: Example - Unsupported Function Syntax
int (*fun1(int))(int a) {}
int fun2(int (*fun1(int))(int))()
-----^-------------------------ERROR
- Declaring a function fun taking a parameter of type integer and returning an integer with typedef is not allowed. Example:
Listing: Example 2 - Unsupported Function Syntax
typedef int fun(int)
-------------------------^-----ERROR
- A cv-qualifier-seq can only be part of a declaration or definition of a non-static member function, and of a pointer to a member function. Example:
Listing: Example 3 - Unsupported Function Syntax
class C {
const int fun1(short);
volatile int fun2(long);
const volatile int fun3(signed);
};
const int (C::*cp1)(short);
-------------^--------------- ERROR:Should be initialized
volatile int (C::*cp2)(long);
-------------^--------------- ERROR: Should be initialized
const volatile int (C::*cp3)(signed);
------------------------^---- ERROR: Should be initialized
- Use of const in a definition of a pointer to a member function of a struct should be accepted. Example:
Listing: Example 4 - Unsupported Function Syntax
struct S {
const int fun1(void);
volatile int fun2(void);
const volatile int fun3(void);
} s;
const int (S::*sp1)(void) = &S::fun1;
if(!sp1);
--------^----------------------------ERROR:Expected int
- When using Character literals, the Multi-characters constant is not treated as int. Example:
Listing: Example - Unsupported Character Literals
int f(int i, char c) {return 1;}
f('abcd', 'c');
-----------^--------------------ERROR
- The String characteristic "A string is an `array of nconstchar'" is not supported. Example:
Listing: Example - Unsupported String Characterstic
int type(const char a[]){return 1};
type("five") != 1 /*Runtime failed*/
- Ambiguity Resolution
Listing: Example - Ambiguity Resolution
struct S {
int i;
S(int b){ i = b;}
};
S x(int(a));
--------^----------ERROR: Should have been a function declaration, not
an object declaration
- Using const as a qualified reference is an unsupported feature. Example:
Listing: Example - Unsupported const Reference
int i;
typedef int& c;
const c cref = i;// reference to int
--------------------^------------------ERROR
- No warning on invalid jump past a declaration with explicit or implicit initializer. Example:
Listing: Example - Invalid Jump
switch(val) {
case 0:
int a = 10; // invalid, warning should be reported
break;
case 1:
int b; // valid
b = 11;
break;
case 2:
break;
}