Detemining the size of int_fast8_t etc. in the frontend

Joseph S. Myers joseph@codesourcery.com
Wed Mar 7 21:03:00 GMT 2007


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



More information about the Gcc mailing list