[Cfp-interest 1647] Re: C++ floating-point work

Steve (Numerics) Canon scanon at apple.com
Wed Jun 17 08:15:34 PDT 2020


> On Jun 17, 2020, at 11:01 AM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
>> What does the C standard have to say about conversions between binary and decimal arithmetic types?  If I remember correctly, the usual arithmetic conversions don't allow them to be mixed during arithmetic, saying it is undefined behavior. 
> 
> Correct.

The arithmetic operator definitions make this a constraint, so mixing them in an arithmetic expression is not UB; a diagnostic is required.

(I do not see this constraint for assignment, which means we also don’t have it for function calls, unless I’m forgetting something. Is that intended?)

– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200617/c84885ef/attachment.htm>


More information about the Cfp-interest mailing list