[cfe-dev] Removing some built-in __*_TYPE__ macros

Ken Dyck Ken.Dyck at onsemi.com
Fri Nov 20 05:02:35 PST 2009


On Friday, November 20, 2009 12:07 AM, Chris Lattner wrote:
> 
> On Nov 19, 2009, at 10:04 PM, Ken Dyck <Ken.Dyck at onsemi.com> wrote:
> 
> > The following built-in macros were once used, but are no longer 
> > required by stdint.h:
> >
> >  __INTMAX_TYPE__
> >  __UINTMAX_TYPE__
> >  __PTRDIFF_TYPE__
> >  __INTPTR_TYPE__
> >  __SIZE_TYPE__
> >  __WCHAR_TYPE__
> >  __WINT_TYPE__
> >
> > ...
> > Provided these references can be removed or 
> > replaced with their standard counterparts (eg. intmax_t), would 
> > there be any objection to removing these definitions from the 
> > built-in definitions?
>
> My opinion is that these should be considered an internal 
> interface and removed.  If anyone complains, we can always 
> add them back.  You could also do a google code search for them.

FYI, here's a summary of Google search result counts:

__INTMAX_TYPE__  -  3,160 hits  vs  intmax_t  -    53,200 (1 to 16.8)
__UINTMAX_TYPE__ -  3,190           uintmax_t -    47,100 (1 :  14.8)
__PTRDIFF_TYPE__ - 10,900           ptrdiff_t -   106,000 (1 :   9.7)
__INTPTR_TYPE__  -    228           intptr_t  -    48,900 (1 : 214.5)
__SIZE_TYPE__    - 35,800           size_t    - 3,120,000 (1 :  87.2)
__WCHAR_TYPE__   - 10,500           wchar_t   -   361,000 (1 :  34.4)
__WINT_TYPE__    -  7,810           wint_t    -    47,700 (1 :   6.0)

I included the results for the standard type definitions, too, to give a
rough sense of proportion for each of the types.

-Ken





More information about the cfe-dev mailing list