This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [basic-improvements] try/finally support for c/c++ - more tests


> But I would like the support for exception handling to include support
> for throwing and catching exceptions, not just try/finally.  The current
> proposal seems too limited to be useful for much else than glibc, IMHO.

How are you going to handle catching exceptions, given that we have no
way to recognize certain types in C (templates, classes, etc)?  See
rth's post about catching exceptions in C.

Besides, this is just a first step.  What other compilers have done
(m$oft) is provide a try/finally/__except.  Where the __except can
catch exceptions.  But they've hand waived over the issue as well and
__except catches *any* exceptions (ala catch(...)) because they've
obviously run into the same problem of type interoperability between
languages.

try/finally is a way to run cleanups, not to implement a full fledged
EH mechanism for C.  If you want that, you should be using C++.

Aldy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]