[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: mapping 754R to specific languages
Guillaume Melquiond <guillaume.melquiond@xxxxxxxxxxx> wrote:
You seem to assume that the 754R draft requires the status flag to be
global to all floating-point operations. As much as I read the section
on "default exception handling", I don't see any such requirement. Quite
the contrary, the draft reads "when flags have scope greater than within
an invoked function, whether and when an asynchronous event, such as a
raising or lowering it in another thread or signal handler, affects the
flag tested within that invoked function". That would solve your issues
both with destructors called at random and concurrent threads, as long
as the language standard decides to do so.
No, it wouldn't, because the first problem is in the SPECIFICATION
of when and where such actions take place. For example, in what
scope are initializers and destructors called - which, in your model,
affects which flags get set? Note that I am talking about the
specification and not the implementation.
As far as I know, the 754R draft does not require a user to be able to
perform floating-point computations in every single point of a program.
If floating-point operations happen to be unsafe when used in a
destructor, is that in any way incompatible with the 754R draft?
The C++ standard does. Even if it were not incompatible with the
IEEE 754R draft, that would merely mean that the draft is incompatible
with C++.
So I'm still convinced it can be done.
Please try producing a draft and running it by SC22WG21. I will
put it forward for you if you want - but I will NOT champion it!
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email: nmm1@xxxxxxxxx
Tel.: +44 1223 334761 Fax: +44 1223 334679