This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal: Make "int format, different type arg" an error, nota warning
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Subject: Re: Proposal: Make "int format, different type arg" an error, nota warning
- From: Kamil Iskra <kamil at wins dot uva dot nl>
- Date: Sat, 3 Jun 2000 13:37:13 +0200 (MET DST)
- cc: gcc at gcc dot gnu dot org
On Fri, 2 Jun 2000, Brad Lucier wrote:
> Maybe I didn't make myself clear. On a 64-bit machine, when the printf
> expects a 32bit argument, and a 64bit argument is pushed on the stack,
> this is most likely an error.
Sure, I understand that.
> I'm just asking that non-matching of
> the size of arguments passed versus arguments expected be treated as an
> error; this does not affect 32-bit code, where these things do match in
> my example.
Oh, so you ment to implement it by checking the size of arguments, not
their type? I withdraw my criticism, then. I thought you were going to
base the check on C language types, so that passing a pointer or long int
on 32 bit machine for %d would cause a hard error, which I found
disturbing.
--
/ Kamil Iskra kamil@wins.uva.nl \
| Section Computational Science, Faculty FNWI, Universiteit van Amsterdam |
| tel. +31 20 525 75 35 fax. +31 20 525 74 90 |
\ Kruislaan 403 room F.202 1098 SJ Amsterdam (NL) /