How can a front-end know what integer mode corresponds to int_fastN_t?
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue Oct 17 19:15:00 GMT 2006
FX Coudert <fxcoudert@gmail.com> wrote on Mon, 16 Oct 2006:
> For Fortran 2003 standard conformance, the Fortran front-end has to
> know at compile-time what integer mode corresponds to some C99 types,
> like intmax_t, intN_t, int_leastN_t, int_fastN_t.
>
> For intN_t and int_leastN_t, I can see how to get them by looking at
> the width of the different integer modes. For intmax_t, it is defined
> in c-common.h as:
>
> #define INTMAX_TYPE ((INT_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
> ? "int" \
> : ((LONG_TYPE_SIZE == LONG_LONG_TYPE_SIZE) \
> ? "long int" \
> : "long long int"))
>
> But I cannot see how the front-end can know the integer mode for
> int_leastN_t. We're likely to include this functionality for the 4.3
> release, so I'll be happy to get a large number of suggestions around
> on how to implement that.
The code in trans-types.c already matches Fortran types to C types, so
you might get some inspiration there.
- Tobi
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Fortran
mailing list