Re: printf behaviour with illegal or malformed format string
- From: "Poul-Henning Kamp" <phk@xxxxxxxxxxxxxx>
- Date: Mon, 12 Dec 2005 16:49:16 +0100
In message <200512121643.39236.max@xxxxxxxxxxxxxx>, Max Laier writes:
>I agree on principle but would like to ask if we need to revisit some of the
>error cases. Especially with regard to 64bit porting there are some
>"artifacts" that might cause serious pain for ported applications if the
>above is adopted.
>
>Specifically, right now the following will warn "long long int format, int64_t
>arg (arg 2)" on our 64bit architectures while it is required on - at least i386
>
> int64_t i = 1;
> printf("%lld", i);
You misunderstood me.
"%lld" is a legal formatting string, my printf implementation would never
object to that.
I'm talking about illegal/non-sensical formatting strings like "%lhd" or
even "%!!!!d" and similar.
The issue you raise is valid and important, but it is not for this bikeshed ;-)
Poul-Henning
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@xxxxxxxxxxx | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"
- References:
- Re: printf behaviour with illegal or malformed format string
- From: Max Laier
- Re: printf behaviour with illegal or malformed format string
- Prev by Date: Re: printf behaviour with illegal or malformed format string
- Next by Date: Re: printf behaviour with illegal or malformed format string
- Previous by thread: Re: printf behaviour with illegal or malformed format string
- Next by thread: Re: printf behaviour with illegal or malformed format string
- Index(es):