bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glibc: printf bug


From: Bruce Korb
Subject: Re: glibc: printf bug
Date: Wed, 28 May 2003 07:24:40 -0700

Ulrich Drepper wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Bruce Korb wrote:
> > and works on most any modern UNIX.
> 
> Only by accident.  You can use parameters multiple times but it has to
> be in all cases with the same type.  Just imagine what happens if you
> use a parameter once with %d and the second time with %g.  If you have
> code which depends on this better fix it.

According to promotion rules, what gets passed for a %c is also
what gets passed for %d.  Clearly if the bucket sizes are different
(as for %g and %d) then the argument numbering cannot be done without
a different abi.  In this particular example, I was passing integers.
Just because one format element ignores the bits above the 128-valued
bit doesn't mean garbage can be dropped in those bits for the wider
format element to pick up.

Regards,
        Bruce




reply via email to

[Prev in Thread] Current Thread [Next in Thread]