This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: size_t printf warnings and preprocessor
Marc Espie <espie@quatramaran.ens.fr> writes:
> I would love to get size_t warnings for printf out of gcc.
> I've already noticed that 3.0 is much better at following typeinfo than
> 2.95 used to.
>
> I would like to have a switch such that
> size_t var;
> printf(format, var);
>
> invariably ends in an error, as there can't be a single format that works
> with size_t.
"%z" is specified by ISO C 99 for size_t. So what's wrong with printf
("%z\n", var) ?
Sorry, I'm lost with your proposal.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj