This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Proposal: Make "int format, different type arg" an error, not a warning
- To: gcc at gcc dot gnu dot org
- Subject: Proposal: Make "int format, different type arg" an error, not a warning
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Thu, 1 Jun 2000 14:09:35 -0500 (EST)
- Cc: lucier at math dot purdue dot edu
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