public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Exception Specifications
@ 2006-12-06 14:27 Perry Smith
  2006-12-06 15:12 ` Ian Lance Taylor
  2006-12-06 15:21 ` John Love-Jensen
  0 siblings, 2 replies; 6+ messages in thread
From: Perry Smith @ 2006-12-06 14:27 UTC (permalink / raw)
  To: MSX to GCC

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@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: Exception Specifications
@ 2006-12-06 14:50 Martin York
  0 siblings, 0 replies; 6+ messages in thread
From: Martin York @ 2006-12-06 14:50 UTC (permalink / raw)
  To: Perry Smith, MSX to GCC

 

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@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] 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@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-06 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-06 14:27 Exception Specifications Perry Smith
2006-12-06 15:12 ` Ian Lance Taylor
2006-12-06 15:21 ` John Love-Jensen
2006-12-06 15:48   ` Perry Smith
2006-12-06 16:04     ` John Love-Jensen
2006-12-06 14:50 Martin York

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).