This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Embedded C++
> So if the compiler accepts such things, I wouldn't expect it to be
> thought of as a *good* EC++ compiler.
As I understand it, a *good* EC++ compiler should make use of the
omitted features, such as not having to deal with multiple inheritance
and templates. In particular, it would come with a iostreams library
that is not templatized and has no locale code.
I personally see EC++ as the wrong direction: It is no guarantee at
all that the compilers supporting it will produce efficient, compact
code. Instead, they propose arbitrary restrictions on programs, based
on what they consider "hard to implement".
As it turns out, some of the EC++ restrictions don't help at all in
reducing code size or increasing execution speed. For example,
multiple inheritance added significant overhead in g++ in the past,
even if it was not used. The solution, of course, is to introduce
thunks, and not to forbid the usage of multiple inheritance.
Regards,
Martin