Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Undefined behaviour (Was: Definition of intervals as subsets...)



Nate Hayes replied to my remark about the appropriateness of
implementation-defined beahaviour:

> I would not share the view that non-standard intervals are peripheral
> to the standard.

My remark was in the context of the Vienna Proposal, which fully defines
behaviour for standard intervals, but notes that there are different and
competing proposals for exploiting non-standard intervals.

It is certainly possible that we will in fact agree on one such approach,
perhaps the Kaucher one, in which case my point would simply be moot.

If however it turns out that we cannot agree on ONE such approach, we
would be faced with the following possibilities:

(a) Pick one anyway, if it carries a majority of the votes, and make a
    significant subset of the committee unhappy -- and, more seriously,
    require an implementation that actually precludes a different
    exploitation of nonstandard intervals.

(b) Pick several, and have a (hopefully static at compile-time) "mode"
    (via #pragma, compiler flag, or other indications) to select the
    applicable one.

(c) Pick none, and declare behaviour for non-standard intervals to be
    undefined.  (This is what Gabriel wants to avoid, and I agree.)

(d) Pick none, and allow implementations to choose none (non-standard
    intervals trigger an error), one or the other, or perhaps even
    several as for (b).  This must be documented, and perhaps there
    should be a uniform way (appropriate to the language environment)
    to report which of several possible named interpretations applies.
    (In C, it would be via some predefined macro, as are already used
    to document floating-point attributes.)

In THAT situation I would strongly prefer (d).

Michel.
Sent: 2009-03-15 04:42:41 UTC