This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: G++ Fundamental Types?
- From: Ian Lance Taylor <iant at google dot com>
- To: Charles Jenkins <cjenkins at tec-usa dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 14 Jan 2010 20:27:10 -0800
- Subject: Re: G++ Fundamental Types?
- References: <8f8a1d962e4dc56e6c66fdd9c586aa4e@tec-usa.com>
Charles Jenkins <cjenkins@tec-usa.com> writes:
> I'm sorry to ask such a stupid question, but I am coming from a Borland C++ background, and although I have scoured http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/, I cannot find a list of which fundamental built-in types GCC understands. I believe keywords like __int8 and __int16 are Borland C++ extensions, and I'd like to know what equivalents I can use in GCC. Where can I find a list of all the basic, built-in types for C++? Thanks!
gcc does not define those sorts of types. On most modern systems you
can #include <stdint.h> to get standard definitions like int8_t. In
the upcoming gcc 4.5 release, gcc will provide its own <stdint.h>, so
that it will be reliably available on all systems.
gcc provides an extension which lets you define integer types of
specific sizes:
typedef int __int8 __attribute__ ((mode (QI)));
I'm not sure I would really recommend using that, though.
Ian