[Cfp-interest] feature macros for exception implementation?

David Hough CFP pcfp at oakapple.net
Tue Jun 3 13:41:45 PDT 2014



Do we need a macro whereby an implementation declares whether it 
implements catch_fe as soon as possible (by traps or inline test and
branch) or as late as possible (at the end by testing flags).
And perhaps another macro that declares whether the try block is
implemented without inserting any code into the try block, apart from
a preamble before and a postamble after, and thus not slowing down
the normal case.
 
One can imagine e.g. snrm2 being coded to use try/catch if doesn't slow
down the normal case, or Kahan's method or scaling otherwise, on the grounds
that the programmer can slow down the normal case less severely than the
compiler can, by changing to a different algorithm entirely.


More information about the Cfp-interest mailing list