How can a front-end know what integer mode corresponds to int_fastN_t?

FX Coudert fxcoudert@gmail.com
Mon Oct 16 22:27:00 GMT 2006


Hi all,

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.

FX



More information about the Fortran mailing list