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


Y'know, I don't see why people would think that.  It doesn't have
__except or __catch or whatever Microsoft calls it, and we say
explicitly that this is only for pthread_cancel() and for exceptions
thrown by other language runtimes...
Maybe I have been so often burned by these language extensions that I
am overly paranoid.  It's certainly possible, and Matt Austern has
stopped commenting, so he is perhaps convinced, leaving me as a lone
voice of insane conservatism.

In contrast to Alexandre, I always thought GCC's C front end philosophy
of having basically every feature in any language was just plain nuts.
It's certainly lead to some major oddness over the years.

In the last several weeks, I've fixed probably twenty or so bugs; of
those about half have to do with language extensions.  These included
zero-sized structure problems, implicit typename problems, strange
brace-enclosed initializer extensions, the zero-sized array extension,
and probably a few more.  Several of the fixes required not just a
simple "oops, forgot that could be that way" kind of change, but a
"hmm -- now what should this mean?" kind of change.

There's way too much bugginess associated with extensions.

We try to take credit for introducing extensions that are now part of
C99 -- but some of them are in C99 with rather different syntax, with
the result that it's now even harder for us.  VLAs are a good example;
our VLAs aren't C99 VLAs.

I agree that try/finally is a lot better than, say, nested functions,
though.

Maybe we could horse-trade; we pull out zero-sized structures or nested
functions, and replace them with try/finally. :-)

--
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com


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