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

Douglas Gregor dgregor at apple.com
Thu Nov 19 13:03:41 PST 2009


On Nov 19, 2009, at 12:04 PM, Ken Dyck 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__
>
> For the most part, the only references to these macros are in the
> preprocessor initialization test case, test/Preprocessor/init.c. A
> couple of them, namely __INTPTR_TYPE__ and __SIZE_TYPE__, are used  
> in a
> few other tests besides. 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?

I strongly object to removing these macros.

> That is, does anybody write code that uses them? And do we
> want them to continue doing so?


All of these predefined macros come from GCC, so we need to retain  
them for GCC compatibility.

	- Doug



More information about the cfe-dev mailing list