Re: C++ for Embedded Systems.
* Jiang:
However, interesting enough, I do not know any OS uses [C++]
exception for error handling. Symbian uses its own Leave/TRAP,
and standard exception shall be disabled to compile its
applications.
Any thoughts about this issue?
It's useful to note that this problem of compatibility between OS
machine code conventions and language features, covers much more than
exceptions.
E.g., it covers data types, function calls and component interfaces.
Exceptions are somewhat exceptional (heh) because at the language level
they can be extremely complex compared to e.g. simple function calls.
Thus, modelling OS exceptions on exceptions in any given language could
drag in much of that language.
Just my 3 cents: Windows exceptions (called SEH exceptions) are
generally used for situations that constitute undefined behavior in C++,
such as dereferencing a nullpointer, and are otherwise optional, so
while some C++ compilers, notably Microsoft's own, support translation
from SEH exceptions to C++ exceptions, such support is non-essential.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]