<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Jim Thomas <<a href="mailto:jaswthomas@sbcglobal.net">jaswthomas@sbcglobal.net</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>interchange types, equivalence, basic types </b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">March 12, 2013 11:16:23 AM PDT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Joseph S. Myers <<a href="mailto:jsm@polyomino.org.uk">jsm@polyomino.org.uk</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Cc: </b></span><span style="font-family:'Helvetica'; font-size:medium;">SC22 WG14 <<a href="mailto:sc22wg14@open-std.org">sc22wg14@open-std.org</a>><br></span></div><br><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 7, 2013, at 11:53 AM, Jim Thomas <<a href="mailto:jaswthomas@sbcglobal.net">jaswthomas@sbcglobal.net</a>> wrote:</div><br class="Apple-interchange-newline">…</div><div><br><blockquote type="cite">On Mar 6, 2013, at 2:36 PM, Joseph S. Myers <<a href="mailto:jsm@polyomino.org.uk">jsm@polyomino.org.uk</a>> wrote:<br><br><blockquote type="cite"></blockquote><blockquote type="cite"><br></blockquote></blockquote>...<br><blockquote type="cite"><blockquote type="cite">* There are references to such things as _Float32 being equivalent to <br>float. What does "equivalent" mean here? The types could be the same <br>type (like "long" and "long int"). They could be compatible types (like <br>"int" and an enum for which the implementation-defined compatible integer <br>type is int), but not the same. They could be distinct (like "char" and <br>"unsigned char", even if char is unsigned) but have the same <br>representation and alignment. Or one might imagine float having one <br>endianness and _Float32 the other (both being binary32); is that intended <br>to be ruled out?<br></blockquote><br><blockquote type="cite"><br>If various possibilities for whether types are the same / compatible / <br>distinct but with the same values and (apart maybe from bit ordering) <br>representation are intended to be allowed, I think the TS should make <br>clear exactly what possibilities are permitted, rather than just using a <br>vague "equivalent".<br></blockquote><br>Their being the same type seems most direct. A possible problem is that this might allow more mixing of type nomenclatures and result in more confusing code. Also, if double and _Float64 were the same type and long double and _Float64 were the same type, then double and long double would be the same type, though they aren't.<br><br><br></blockquote><div><br></div><div>Is there any reason to require a stricter sense of "equivalence" than in the following?</div><div><br></div><div>An implementation that defines __STDC_IEC_60559_BFP__ shall provide:</div><div><ul><li> _Float32 and _Float64 as interchange floating types with the same representation and alignment requirements as float and double, respectively</li><li> _Float16 as a data-interchange type</li></ul></div><div>and may provide:</div><div><br></div><div><ul class="MailOutline"><li>_Float16 as an interchange floating type</li></ul></div><div><br></div><div>If the implementation’s long double type supports an IEC 60559 interchange format of width N, then the implementation shall provide the type _FloatN as an interchange floating type with the same representation and alignment requirements as long double.</div><div><br></div><br>...<br><blockquote type="cite"><blockquote type="cite"><br>* Are all the new types basic / fundamental types, so that malloc must <br>return memory suitably aligned for them (see my reflector message 12832 on <br>9 Jan for more on the issues there)? C11 6.2.5#14 says "The type char, <br>the signed and unsigned integer types, and the floating types are <br>collectively called the basic types.", leaving open the question of <br>whether data interchange types are also basic types.<br></blockquote><br>Issue: how to assure that malloc can handle data-interchange types.<br><br><br></blockquote><div><br></div>Any problem with including data-interchange types as basic types?</div><div><br></div><div>The type char, the signed and unsigned integer types, the floating types, and the data-interchange types are collectively called the basic types.</div><div><br></div><br><div>-Jim Thomas</div></div></blockquote></div><br></body></html>