Dear all,

while working on a PR related to kind=4 character issues, I saw the
following in gfortran.h:


/* We need to store source lines as sequences of multibyte source
   characters. We define here a type wide enough to hold any multibyte
   source character, just like libcpp does.  A 32-bit type is enough.  */

#if HOST_BITS_PER_INT >= 32
typedef unsigned int gfc_char_t;
#elif HOST_BITS_PER_LONG >= 32
typedef unsigned long gfc_char_t;
#elif defined(HAVE_LONG_LONG) && (HOST_BITS_PER_LONGLONG >= 32)
typedef unsigned long long gfc_char_t;
#else
# error "Cannot find an integer type with at least 32 bits"
#endif


This seems to have been introduced by FX, but I do not really
understand it.  Can't we use a fixed and platform-independent
type that can hold wide chars?  Isn't a 32-bit / 4-byte type
sufficient?

Thanks for any enlightenment,
Harald

Reply via email to