[Cfp-interest] further thoughts on exception clause syntax

Jim Thomas jaswthomas at sbcglobal.net
Wed Jun 4 13:05:26 PDT 2014


On Jun 3, 2014, at 9:40 PM, David Hough CFP <pcfp at oakapple.net> wrote:

>> I’m worried about it as an issue for the language specification, not compilers.
> 
> I don't see how standard pragmas make this any easier or more palatable.
> But will the C committee think so once it figures out that this is just
> try/catch in more primitive attire?

The try-catch approach needs new keywords, changes to the grammar, and a check whether the statements in the standard about relevant collective constructs are still correct or need to be changed to accommodate the new ones.
Maybe we could collect the pros and cons (that we see) of the two approaches and ask for input on the WG 14 reflector. 

-Jim

> 
>> Hmm. Seems like the pragma at the beginning (telling the compiler which exceptions have to be watched) should be sufficient.
> 
> Yes, my cut and paste error; 
> the two-pragma method can be used for one-pass compilers.
> But if we're not doing try/catch syntax we might as well do what we need,
> and put the catch before the try, with only one pragma needed.
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest




More information about the Cfp-interest mailing list