<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 13, 2014 at 1:30 AM, Paul A. Bristow <span dir="ltr"><<a href="mailto:pbristow@hetp.u-net.com" target="_blank">pbristow@hetp.u-net.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:cfe-dev-bounces@cs.uiuc.edu" target="_blank">cfe-dev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:cfe-dev-bounces@cs.uiuc.edu" target="_blank">cfe-dev-bounces@cs.uiuc.edu</a>] <b>On Behalf Of </b>Chandler Carruth<br>
<b>Sent:</b> 11 June 2014 20:15<br><b>To:</b> Ben Smith<br><b>Cc:</b> clang-dev Developers<br><b>Subject:</b> Re: [cfe-dev] Predefined stdint macros (i.e. __UINT8_TYPE__, etc.)<u></u><u></u></span></p></div></div><p class="MsoNormal">
<u></u> <u></u></p><div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Wed, Jun 11, 2014 at 8:10 PM, Ben Smith <<a href="mailto:binji@chromium.org" target="_blank">binji@chromium.org</a>> wrote:<u></u><u></u></p>
<div><p class="MsoNormal">Hello cfe-dev,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Clang defines a subset of the predefined stdint macros that GCC does. In particular, GCC defines the following macros many of which are not defined in Clang:<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">__U?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE}__<u></u><u></u></p></div><div><p class="MsoNormal">__U?INT{PTR,MAX}_{MAX,TYPE}__<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Some of these macros are used in newlib's stdint.h, if they exist. It seems that it hasn't been thoroughly tested with Clang, however, as some macros are assumed to exist.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Is it worth adding these to Clang?<u></u><u></u></p></div></div></div><p class="MsoNormal"><br>Yes, we should try to be compatible here, and generally it seems reasonable to define the fully expanded set of these.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p></div></div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Yes please – these are very helpful – and  these are very likely to become C++Standard,</span></p>
</div></div></div></blockquote><div><br></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div>They're not, but the forms without the "__" are. We currently provide those forms without having the compiler implicitly predefine them. (GCC defines these as a convenience for its own <stdint.h> to use; Clang's <stdint.h> doesn't use them, nor does glibc's one.)</div>
</div></div><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple">
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> and also the floating-point specified-width versions proposed<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#006621;background:white"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf" target="_blank">www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/<b>n3626</b>.pdf</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#006621;background:white"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#006621;background:white">(</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">and the corresponding C macros in the identical Wg14 paper n1703)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A fully working prototype using GCC developed by Christopher Kormanyos shows that these can be very useful, especially the floating-point types to facilitate 128-bit FP with C++, but also with single-board ‘bare–metal’ embedded systems.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Christopher Kormanyos will present an updated version showing how this is useful in practice at Rapperswil.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Paul<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p></div></div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">---<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Paul A. Bristow<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Prizet Farmhouse<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Kendal UK LA8 8AB<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="tel:%2B44%2001539%20561830" value="+441539561830" target="_blank">+44 01539 561830</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
</div><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>