This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Detemining the size of int_fast8_t etc. in the frontend
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 7 Mar 2007 21:03:43 +0000 (UTC)
- Subject: Re: Detemining the size of int_fast8_t etc. in the frontend
- References: <45EF10B8.8040608@net-b.de>
On Wed, 7 Mar 2007, Tobias Burnus wrote:
> Hi,
>
> gfortran provides via ISO C Bindings access to the C types int, float
> etc. It also provides access to int_fast8_t, int_fast16_t, etc. of stdint.h.
>
> Using "#include <stdint.h>" with e.g. sizeof(int_fast8_t) does not work
> with cross compilations. (It actually fails already for -m32 on x86-64.)
> On the other hand, "struct gcc_target" does not seem to provide this
> information.
>
> What is the proper way to obtain this information?
See bug 448. You'll need to define lots of target macros to match
existing <stdint.h> and <inttypes.h> files. Defaults for those macros
will be tricky (for example, glibc and newlib use different choices of
types) and testcases will be needed to make sure the types are the same as
in existing system headers.
--
Joseph S. Myers
joseph@codesourcery.com