By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,727 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,727 IT Pros & Developers. It's quick & easy.

looking for compilers and/or platforms **without** C++ exception support

P: n/a
Hi there,

Please forgive me for posting this article on multiple groups.
Being new in the newsgroups, I was not sure which group would
have been appropriate for my question. Sorry.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.

Best Regards,
Bill

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Thu, 30 Oct 2003 11:07:45 -0500, Bill Davidson wrote:
Hi there,

Please forgive me for posting this article on multiple groups.
Being new in the newsgroups, I was not sure which group would
have been appropriate for my question. Sorry.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


Convince gcc porters to stop work dead, and you'll have quite a few
OSes...
-Dhruv :-)


Hello

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #2

P: n/a
Bill Davidson wrote:

I'm not sure why you cross-posted this to newsgroups without 'c++' in
their names.... I've reduced the list of ng's.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.

g++ has options like -fno_exceptions that may do what you want. It
won't fail to compile valid exception code, but it will not generate the
associated assembly.

See the manpage for details.

Adam

--
Reverse domain name to reply.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #3

P: n/a
Bill Davidson wrote:
Hi there,

Please forgive me for posting this article on multiple groups.
Being new in the newsgroups, I was not sure which group would
have been appropriate for my question. Sorry.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


Microsoft embedded C++ 3.0 (eVC 3)
--
GISTEK software
Gis consultant.
gi****@gistek.net
www.gistek.net

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #4

P: n/a

"Bill Davidson" <ca*************@yahoo.ca> wrote in message
news:c1**************************@posting.google.c om...
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


Many C++ compilers for 16 bit DOS do not support exception handling,
templates or RTTI (but Digital Mars C++ does).
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #5

P: n/a
On 30 Oct 2003 11:07:45 -0500, ca*************@yahoo.ca (Bill
Davidson) wrote in comp.realtime:
Hi there,

Please forgive me for posting this article on multiple groups.
Being new in the newsgroups, I was not sure which group would
have been appropriate for my question. Sorry.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.

Best Regards,
Bill


Since you posted to comp.arch.embedded with such a hopelessly vague
question, there are quite a few architectures with no C++ compilers at
all, so they certainly do not support native, or foreign, C++
exceptions.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #6

P: n/a
In article news:<c1**************************@posting.google. com>, Bill Davidson
wrote:
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


It seems a strange question - what for?

The C++ language is now defined by an ISO standard. The language specified in
that standard /does/ support exceptions, and the runtime library described in the
standard /does/ use exceptions. Any compiler that doesn't support them isn't C++
(not standard C++, anyway).

Maybe that's the answer you're looking for? Non-C++ compilers don't support
native C++ exceptions. Fortran compilers, for example.

If, on the other hand, your question is really "how widespread are C++-subset
compilers that don't support exceptions" or "if I use exceptions in my code will
my code be significantly less portable than if I don't use them" then the answer
is that all modern compilers on desktop platforms do support exceptions, as do
the better embedded ones. I would expect this situation to improve as compilers
continue to be updated to include more of the provisions of the standard.

- I believe that the Microsoft compilers targetting Windows CE currently
don't support exceptions (is that still true? It seems a strange
omission),

- Visual C++ for 16-bit platforms didn't support excpetions (but had
an exception-like system without stack unwinding kludged with longjump).

- C++ on the Symbian platform does not use exceptions (because it depends
upon an old version of the gcc cross-compiler which is deficient in
exception support) and so has its own error-handling mechanism. Porting code
to/from Symbian is a fairly major undertaking because Symbian provides a large
runtime library that is peculiar to the Symbian platform, support for
exceptions will be the least of your worries.

All the C++ compilers I'm aware of for Windows and/or linux do support
exceptions.

Unless you have a particular compiler or platform in mind that you know does not
support exceptions I would go ahead and use them. In my experience the use of
exceptions leads to clearer code and more robust error handling than the
alternatives.

Daniel James | djng
Sonadata Limited, UK | at sonadata
| dot co dot uk

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #7

P: n/a
Bill Davidson wrote:
Hi there,

Please forgive me for posting this article on multiple groups.
Being new in the newsgroups, I was not sure which group would
have been appropriate for my question. Sorry.

My Question
-----------
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.

Best Regards,
Bill


ARM - ARM Developer Suite (ADS) 1.2
ARM - RealView Compilation Tools (RVCT) 2.0

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #8

P: n/a
On 31 Oct 2003 12:19:46 -0500, Daniel James
<wa*********@nospam.aaisp.org> wrote:
In article news:<c1**************************@posting.google. com>, Bill Davidson
wrote:
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


It seems a strange question - what for?


The wording looks quite strange, but considering that the realtime and
embedded newsgroups are included, I would guess that the original
poster is considering situations in which exception handling is not
desirable.

A compiler that does not support exceptions will not generate
exceptions at run time :-).

I think that the more relevant question in the embedded and/or
realtime environment is that, can a compiler that supports exception
handling be configured in such a way that it does not generate
exceptions ? This is especially important regarding the run time
libraries, such as "new".

The exceptions can not be disabled, then the use of C++ in some
situations is out of the question.

Paul

Jul 19 '05 #9

P: n/a
"Paul Keinanen" <ke******@sci.fi> wrote in message
news:qg********************************@4ax.com...
On 31 Oct 2003 12:19:46 -0500, Daniel James
<wa*********@nospam.aaisp.org> wrote:
In article news:<c1**************************@posting.google. com>, Bill Davidson
wrote:
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


It seems a strange question - what for?


The wording looks quite strange, but considering that the realtime and
embedded newsgroups are included, I would guess that the original
poster is considering situations in which exception handling is not
desirable.

A compiler that does not support exceptions will not generate
exceptions at run time :-).

I think that the more relevant question in the embedded and/or
realtime environment is that, can a compiler that supports exception
handling be configured in such a way that it does not generate
exceptions ? This is especially important regarding the run time
libraries, such as "new".

The exceptions can not be disabled, then the use of C++ in some
situations is out of the question.


Right. Some compilers, particularly in the embedded world, do indeed
permit exceptions to be disabled. That can lead to code that is smaller
or faster (or both). Or it can simply permit the use of C++ in a
project that outlaws exceptions for safety reasons (whether justified
or not). If you want to use a compiler that can disable exceptions,
then you also need a library that can work that way. We provide such
a creature, which is one of the reasons why so many embedded compilers
ship with our library. I believe one or two other libraries do too.
But if the library that comes with your compiler doesn't work properly
in the absence of exception handling, your only choice is not to use
the library.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Jul 19 '05 #10

P: n/a
Bill Davidson wrote:
I am looking for a list of popular compilers and/or platforms that
*do not* support native C++ exceptions. Any pointers in this
regard is appreciated.


The notion of 'native' is not clear to me, however, it might mean three
things IMHO, either

1. the compiler does not know the concept of exceptions (it is not native
to the compiler implementation) and therefore does not support
try/catch
2. the compiler does not know that the platform it generates code for
has a particular exception mechanism as for example the structured
exception mechanism of Windows NT or a similar architecture in VMS
(one of the signs showing heritage)
3. the platform on which the code runs does not know an exception
mechanism, most if not all UNIXen.

In case #1, that would be a pretty old compiler I would say. Case #2, I
would say could be versions of the Borland C++ compilers, that indeed make
use of the structured exception handling mechanism but only in a limited
way, meaning that they /do/ use structured exception handling for
propagating exceptions by using a structured exception with the 0x0EEFFACE
number (or 0x0EEDFACE for Delphi), and in case #3, the exception handling
mechanism is almost always 'emulated' in some sense.

What is very instructive in the last case is what code a compiler inserts at
the start of a try/catch block. I think I am not far from reality if in
most cases a register is reserved for pointing to the current exception
handler while outer exception handlers are kept in a stack, much like
structured exception handling in Windows NT.

--

Ruurd
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Jul 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.