<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 11, 2014 at 2:46 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 12/06/2014 00:33, Ben Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
On Wed, Jun 11, 2014 at 12:14 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a> <mailto:<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>>> wrote:<br>

<br>
<br>
    On Wed, Jun 11, 2014 at 8:10 PM, Ben Smith <<a href="mailto:binji@chromium.org" target="_blank">binji@chromium.org</a><br></div><div class="">
    <mailto:<a href="mailto:binji@chromium.org" target="_blank">binji@chromium.org</a>>> wrote:<br>
<br>
        Hello cfe-dev,<br>
<br>
        Clang defines a subset of the predefined stdint macros that<br>
        GCC does. In particular, GCC defines the following macros many<br>
        of which are not defined in Clang:<br>
<br>
        __U?INT{_,_FAST,_LEAST}{8,16,<u></u>32,64}_{MAX,TYPE}__<br>
        __U?INT{PTR,MAX}_{MAX,TYPE}__<br>
<br>
        Some of these macros are used in newlib's stdint.h, if they<br>
        exist. It seems that it hasn't been thoroughly tested with<br>
        Clang, however, as some macros are assumed to exist.<br>
<br>
        Is it worth adding these to Clang?<br>
<br>
<br>
    Yes, we should try to be compatible here, and generally it seems<br>
    reasonable to define the fully expanded set of these.<br>
<br>
<br>
Great, I'll make a CL adding these.<br>
</div></blockquote>
<br>
Be sure to put them behind !MSVCCompat* as we've been seeing problem reports about GCC definitions confusing MSVC code recently.<br></blockquote><div><br></div><div>I don't agree with this necessarily.  If the macros don't actively conflict with MSVC, I would add them to the set of integer types that we currently define.</div>
<div><br></div><div>The problem with the __EXCEPTIONS macro was that exceptions don't work in the MSVC ABI yet.  Once they do work, I would like to define __EXCEPTIONS so that portable headers that detect the GCC macro will Just Work.</div>
</div></div></div>