RFC: adding knowledge of the int_fastN_t types to the compiler
Joseph S. Myers
joseph@codesourcery.com
Thu Mar 13 15:49:00 GMT 2008
On Thu, 13 Mar 2008, FX Coudert wrote:
> > Note that the size is not enough for implementing <stdint.h>, you need the
> > actual type as well to get C++ mangling right. So I suggest using
> > type-name strings as is done for the other standard typedefs
>
> That raises a question: darwin has, for example, in its system headers:
>
> typedef signed char int8_t;
> [...]
> /* 7.18.1.3 Fastest-width integer types */
> typedef int8_t int_fast8_t;
> typedef int16_t int_fast16_t;
>
> To do the right thing, do I have to #define INT_FAST8_TYPE in darwin.h to be
> "int8_t", or "signed char"? I'd go for the second, but as I know nothing about
> C++, I'd like to be sure :)
Typedefs are always just another name for the same type, so "signed char".
tm.texi's description of SIZE_TYPE describes the format of strings used
for the type names. (Perhaps enums would be better than strings with
particular forms of the C type names, but that's a completely independent
matter.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list