Re: C++ in embedded systems

From: Martin Vuille (
Date: 08/19/03

Date: 19 Aug 2003 09:07:56 -0400 (Dingo) wrote in

> (Mad@Spammers) wrote in message
> news:<>...
>> I have followed some discussions about C++ deployment in embedded
>> systems and I learned there are several criticism on C++ itself and
>> its deployment in such systems.
>> <SNIP>
>> I would appreciate if you could comment on this and give hints on
>> what to avoid when programming for embedded systems in C++.
>> Suggestions of books and links will be very much appreciated as well.
> You should check out the Rationale for Embedded C++. It gives a good
> overview of which standard C++ features were left out and why.
> I think they drew a pretty good line about which features are and
> aren't useful for embedded systems. Although I don't understand why
> they felt it was necessary to eliminate wchar_t.

Personally, I subscribe to the view that EC++ was concocted by
compiler vendors in order to create a market for their non-Standard-
compliant C++ compilers.

I find many aspects of the rationale downright insulting, making
direct or indirect references to embedded system developers' supposed
limited ability to comprehend C++.

The removal of templates, exceptions, and RTTI is arguably justified
on the grounds of efficiency although, as has been pointed-out elsewhere
in this thread, any half-decent C++ compiler will allow the user to
disable those anyway.

On the other hand, perhaps someone can explain why "mutable", namespaces,
and the C++-style casts were removed, if not to make the compiler-
writers' lives easier.


Do not send e-mail to the above address. I do not read e-mail sent there.