Removing some built-in __*_TYPE__ macros

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? That is, does anybody write code that uses them? And do we
want them to continue doing so?

-Ken

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

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.

-Chris

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

Just my 5 cents:

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

It seems to be used in huge variety of the project. I just grabbed some:
- uClinux
- perl
- newlib

It seems we need to keep them.

Ok, it looks like they really are used. Let's keep them, they have very little cost.

-Chris