public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC Feature question
@ 2002-09-27 22:15 Michael Lovett
  2002-09-27 22:45 ` Aldy Hernandez
  2002-09-28  0:20 ` Tim Prince
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Lovett @ 2002-09-27 22:15 UTC (permalink / raw)
  To: gcc

Hiya

Does the current GCC (3.2x) support the try/finally construct?

We are porting apps to UNIX from Windows but so far can't find a compiler with try/finally. It is such a useful, convenient construct it is hard to imagine structured programming without it.

Does anyone know if this is planned for the future if it isn't available now?

Thanks so much!
Michael Lovett

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: GCC Feature question
@ 2002-10-04 12:52 Michael Lovett
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Lovett @ 2002-10-04 12:52 UTC (permalink / raw)
  To: aldyh, jason; +Cc: gcc

Well, sometimes there are things you want to do locally in your code that don't necessarily involve object destruction, and you'd like these things to happen whether or not an exception was thrown. These are the types of things we are anxious for try/finally.

M

>>> Jason Merrill <jason@redhat.com> 10/01/02 01:30PM >>>
On 27 Sep 2002 20:42:56 -0700, Aldy Hernandez <aldyh@redhat.com> wrote:

>  > We are porting apps to UNIX from Windows but so far can't find a
>  > compiler with try/finally. It is such a useful, convenient construct
>  > it is hard to imagine structured programming without it.
>
> C or C++?  With C++ you can emulate it with constructors, albeit ugly.

It's not *that* ugly.  For C++ using a destructor encourages you to write
reusable finalization code.

Jason

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <sd9dae8d.087@farm_groupwise1_srv.morpace-i.com>]

end of thread, other threads:[~2002-10-04 21:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-27 22:15 GCC Feature question Michael Lovett
2002-09-27 22:45 ` Aldy Hernandez
2002-10-04 12:26   ` Jason Merrill
2002-09-28  0:20 ` Tim Prince
2002-09-28 10:00   ` Aldy Hernandez
2002-10-04 12:52 Michael Lovett
     [not found] <sd9dae8d.087@farm_groupwise1_srv.morpace-i.com>
2002-10-04 15:20 ` Jason Merrill

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