Embedded C++ Compiler Limitations

These days there are many C++ compilers available for developing embedded software.  However, they often provide a restricted set of language features, or have the facility to switch-off certain features. Some examples are given below, and from these it seems the feature most likely to be omitted is exception handling.

The unit testing tool being developed by Apollo Systems Contracts supports exception handling (including testing that exceptions are generated and detecting uncaught exceptions). However exception handling can be disabled, making it compatible with ‘Embedded C++’ as defined below.


ARM’s C++ compiler has exceptions disabled by default.


IAR’s compiler supports exceptions, but can also be run in ‘Embedded C++’ mode (see below), or their own rather less-restricted ‘Extended Embedded C++’ mode (just lacks RTTI and Exceptions).

Embedded C++

The Embedded C++ language (EC++) lacks the following features:

  • Multiple inheritance
  • Virtual base classes
  • Run-time type information (RTTI)
  • New style casts (static_cast, dynamic_cast, reinterpret_cast, and const_cast)
  • The mutable type qualifier
  • Namespaces
  • Exceptions
  • Templates

Permanent link to this article: http://www.apollo-systems.co.uk/dev/2011/embedded-c-compiler-limitations/