[Cfp-interest] draft of syntax discussion for C committee

David Hough CFP pcfp at oakapple.net
Fri Jun 6 14:02:18 PDT 2014


> Is there a need for something like [multiple catch clauses]

I modified the draft as follows:

45,46c45,46
< catch (floating-point exception-list) {
<  exceptional case code...
---
> catch (floating-point exception-list 1) {
>  exceptional cases 1 code...
47a48,50
> catch (floating-point exception-list 2) {
>  exceptional cases 2 code...
> }
52,53c55,57
< output variables may be in an indeterminate state) and the exceptional case
< code is executed.      In either case, after the normal case terminates
---
> output variables may be in an indeterminate state) and the corresponding
> exceptional case code is executed.      
> In either case, after the normal case terminates
54a59,65
> Note that exception-list might contain more than one exception, such
> as FE_OVERFLOW|FE_UNDERFLOW if both are to be handled by the same code,
> though typically there is only one exception in the list.
> Also note that there might be more than one catch clause to catch more than
> one group of exceptions to be handled differently,
> though typically there is only one catch clause;
> the examples that follow show only one but there could be more.



More information about the Cfp-interest mailing list