If you are using a C99 compiler, then as well as constructs in the C90 subset supported by eCv, you may use the following C99 constructs:
comments introduced by // (these are allowed by eCv even in C90 mode)
declarations do not have to be at the start of a compound statement (however, eCv does not allow declarations directly in the cases of a switch-statement)
inline storage class when declaring functions
_Bool type (provided that you set up the correct definitions so that it is equivalent to eCv's bool type)
compound literals (but not using named member notation)
the first clause of a for-loop header may be a declaration instead of an expression
If you are using a C++ compiler, then as well as constructs in the C90 subset supported by eCv, you may use the following C++ constructs:
comments introduced by //
declarations do not have to be at the start of a compound statement (however, eCv does not allow declarations directly in the cases of a switch-statement)
inline storage class when declaring functions
bool type
wchar_t is a type, not a typedef
const_cast<>, static_cast<> and reinterpret_cast<> operators (see note 1)
the first clause of a for-loop header may be a declaration instead of an expression
extern "C" { ... } declarations
class declarations, including public and private variable, typedef and static function member declarations (but not constructor, destructor, operator, non-static function or static data member declarations, or pointer-to-member types, or class inheritance)
class, struct, union and enum names are recognized as type names (i.e. no need to introduce them with 'struct' or 'union' or 'enum' every time you refer them)
function overloading (see note 2)
default function parameter values
Notes:
When you set the source language to C++, a warning will be generated if you use a C-style cast expression that is not equivalent to a static_cast. You are expected to use reinterpret_cast or const_cast to express these more dangerous types of cast.
When a function call is potentially ambiguous because the called function has been overloaded, eCv does not apply the standard C++ disambiguation rules, which are complicated and sometimes give surprising results. Instead, eCv applies the stricter rule that the call must match the argument types of one of the candidate function declarations exactly, with no implicit type conversions required. Otherwise, the call is considered badly formed and an error is reported.
The following C++ features are planned to be supported in a future release of eCv:
non-static function members and static data members of classes
constructors (but not user-defined copy constructors)
some types of operator declaration
template declarations that do not involve member lookup on dependent types, specialization, or the export keyword
class inheritance and protected members
reference types for parameter passing
eCv Manual, Version 6.0, January 2013.
© 2013 Escher Technologies Limited. All rights reserved.