[cfe-dev] Predefined stdint macros (i.e. __UINT8_TYPE__, etc.)

Alp Toker alp at nuanti.com
Wed Jun 11 14:46:37 PDT 2014


On 12/06/2014 00:33, Ben Smith wrote:
> On Wed, Jun 11, 2014 at 12:14 PM, Chandler Carruth 
> <chandlerc at google.com <mailto:chandlerc at google.com>> wrote:
>
>
>     On Wed, Jun 11, 2014 at 8:10 PM, Ben Smith <binji at chromium.org
>     <mailto:binji at chromium.org>> wrote:
>
>         Hello cfe-dev,
>
>         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?INT{_,_FAST,_LEAST}{8,16,32,64}_{MAX,TYPE}__
>         __U?INT{PTR,MAX}_{MAX,TYPE}__
>
>         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.
>
>         Is it worth adding these to Clang?
>
>
>     Yes, we should try to be compatible here, and generally it seems
>     reasonable to define the fully expanded set of these.
>
>
> Great, I'll make a CL adding these.

Be sure to put them behind !MSVCCompat* as we've been seeing problem 
reports about GCC definitions confusing MSVC code recently.

* I'm going to propose a GCCCompat LangOpt in the next few days but your 
patch will likely be ready before then.

Alp.



>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-dev mailing list