Print statements with %d in trans-common.c

Steve Ellcey sje@cup.hp.com
Tue Jan 11 22:37:00 GMT 2005


While looking around in fortran/trans-common.c I noticed that there are
two print statements which print out a variable of type HOST_WIDE_INT
(offset in translate_common, common_segment->offset in translate_common)
using a %d format.  This will not work right if HOST_WIDE_INT translates
to long and if long is a different size then int.  It will also not work
if HOST_WIDE_INT is long long and that type is a different size then
int, which is the case I am seeing.

Is there a standard way to handle this?  Truncating to int doesn't 
seem right.

Steve Ellcey
sje@cup.hp.com



More information about the Fortran mailing list