RE: Exception Specifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

Hope I am not stepping into a religious war but.

I think the general consensus is that it is not a good idea to use
exception specification on functions/methods. My main objection is that
I do not want an unexpected exception to make the application exit with
a call to 'unexpected()'.

I think Hurb Sutter summaries the point well (an more eloquently that I)
on this page:
http://www.gotw.ca/gotw/082.htm (see section 4)


Martin.



-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Perry Smith
Sent: Wednesday, December 06, 2006 9:27 AM
To: MSX to GCC
Subject: Exception Specifications

I believe I saw in some of the boost libraries that they do not use
exception specifications because some compilers produce slower code.

I'm considering adding exception specifications to most/all of my
functions -- mostly for my own sake.  But I'm wondering how it will
affect the compiler's generated code.  (i.e. if it is going to affect
performance, I can put the exception specifications in comments just as
easily).  I'm currently using gcc 4.0.2.

Thank you,
Perry Smith ( pedz@xxxxxxxxxxxxxxxx )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux