This is the mail archive of the 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

>>>>> "Mark" == Mark Mitchell <> writes:

 >> #define pthread_cleanup_push(routine_, arg_) \
 >> __builtin_cleanup_block(routine_, arg_) {
 >> #define pthread_cleanup_pop(doit_) \
 >> __builtin_toggle_do_cleanup(doit_); }

 > Something like this is a much, much closer to what I think we should
 > do.

You know, I ain't gonna comment much on this because I was just an
innocent bystander who just got told what to do, but...

It seems we sometimes, in an effort to be purists, bend over backwards
to avoid adding front end extensions and end up with rather ugly
interfaces.  It's not like try/finally isn't available in other
compilers, and it's not like the __builtin_cleanup_block() stuff is
aesthetically pleasing either.

Just think, if any of the nifty features presently available as
extensions in GCC (inline, nested functions, labels as values, inline
assembly, etc) were to be brought up now, I'm 99% sure they'd be shot
down, purely because they were front end extensions.  I think we're
loosing the GNU's Not Unix spirit.

Be that as it may, my point is purely a philosophical one.  I will not
argue for either standpoint.  Exception handling is not my thing.

 > Thanks for working this through.

 > -- 
 > Mark Mitchell      
 > CodeSourcery, LLC  

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