public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Exception handling
@ 2017-05-29  9:00 Flis, Przemyslaw (Nokia - PL/Wroclaw)
  2017-05-29  9:09 ` Florian Weimer
  2017-05-31  8:32 ` Andrew Haley
  0 siblings, 2 replies; 8+ messages in thread
From: Flis, Przemyslaw (Nokia - PL/Wroclaw) @ 2017-05-29  9:00 UTC (permalink / raw)
  To: gcc-help

Hi,
as far as I know, the way of handling exceptions "under the hood" is not defined in C++ standard. In "Technical report on C++ performance " from 2008, I've found two main approaches to exception handling - so called "code" and "table" approach. Is there any way to determine which is used by gcc compiler? Does it depend on platform (i.e. ARM, x86 etc.) or compiler version? 
As far I understand "table" approach has almost zero time overhead when exception does not appear. But when it does, is this time overhead predictable? If it is, how to predict it?

Is there any newer report on C++ performance than one mentioned above? 

Best Regards
Przemyslaw Flis

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Exception Handling
@ 2003-01-16 17:17 Ryan Cuprak
  2003-01-17  7:15 ` Michal Lipták
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Cuprak @ 2003-01-16 17:17 UTC (permalink / raw)
  To: gcc-help


Hello,
 Is it safe to throw an exception as such:
 throw new MyException ( "method","class","message);

 and then catch it as:
 try {
 }
 catch ( MyException *e ) {
   //-- do something
   delete e;
 }
 I am just looking for some guidelines on exceptions. In doing google searches
for info, I came across an email stating that the implementation of exceptions
varies by compiler in that some runtime systems do a binary copy of the
exception and then pass it to the catch etc.
 
Thanks,
 Ryan

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Exception Handling
@ 2003-01-16 17:16 Ryan Cuprak
  2003-01-16 17:33 ` Nathan Sidwell
  0 siblings, 1 reply; 8+ messages in thread
From: Ryan Cuprak @ 2003-01-16 17:16 UTC (permalink / raw)
  To: gcc-help


Hello,
 Is it safe to throw an exception as such:
 throw new MyException ( "method","class","message);

 and then catch it as:
 try {
 }
 catch ( MyException *e ) {
   //-- do something
   delete e;
 }
 I am just looking for some guidelines on exceptions. In doing google searches
for info, I came across an email stating that the implementation of exceptions
varies by compiler in that some runtime systems do a binary copy of the
exception and then pass it to the catch etc.
 
Thanks,
 Ryan

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

end of thread, other threads:[~2017-05-31  8:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29  9:00 Exception handling Flis, Przemyslaw (Nokia - PL/Wroclaw)
2017-05-29  9:09 ` Florian Weimer
2017-05-31  8:32 ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2003-01-16 17:17 Exception Handling Ryan Cuprak
2003-01-17  7:15 ` Michal Lipták
2003-01-17 17:18   ` Oliver Kullmann
2003-01-16 17:16 Ryan Cuprak
2003-01-16 17:33 ` Nathan Sidwell

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).