[PATCH] Fix ar -M
Jakub Jelinek
jakub@redhat.com
Sat Oct 20 01:24:00 GMT 2001
On Fri, Oct 19, 2001 at 06:21:37PM -0400, DJ Delorie wrote:
>
> > + sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname);
>
> I wonder if we can count on sprintf printing "" with bname-name is
> zero? I know if you use %.*c with zero, it prints one character.
But %.*c is different from %.*s, isn't it.
Particularly, precision behaviour is defined for diouxX conversions (min
number of digits), eEf (number of digits after radix), gG (maximum number of
significant digits), sS (maximum number of bytes to be printed).
Ie. no mention for precision with c conversion (what would that mean?), but
apparently any implementation which for %.*s 0, string would output more than 0
zero characters would break the standard (it would output more than the
maximum number of characters it is allowed to output).
Jakub
More information about the Binutils
mailing list