Proposal: Make "int format, different type arg" an error, not a warning
Brad Lucier
lucier@math.purdue.edu
Thu Jun 1 12:09:00 GMT 2000
When you have something like
printf ("%d\n", (HOST_WIDE_INT) &i);
on the alpha, then the format is for a 32-bit int, while the actual
argument is a 64bit long. There are other similar cases. (Another common
problem is assuming, e.g., (7 - strlen(a)) is an int, while strlen
returns a size_t, which is a 64bit long on the alpha.)
These often indicate serious enough problems that I think it would be
better that they be errors rather than warnings.
Brad Lucier
More information about the Gcc
mailing list