<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jun 17, 2020, at 11:01 AM, Fred J. Tydeman <<a href="mailto:tydeman@tybor.com" class="">tydeman@tybor.com</a>> wrote:</div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">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.<span class="Apple-converted-space"> </span><br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Correct.</span></div></blockquote></div><br class=""><div class="">The arithmetic operator definitions make this a constraint, so mixing them in an arithmetic expression is not UB; a diagnostic is required.</div><div class=""><br class=""></div><div class="">(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?)</div><div class=""><br class=""></div><div class="">– Steve</div></body></html>