Date: Mon, 12 Dec 2005 16:49:16 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Max Laier <max@love2party.net> Cc: freebsd-arch@freebsd.org Subject: Re: printf behaviour with illegal or malformed format string Message-ID: <2926.1134402556@critter.freebsd.dk> In-Reply-To: Your message of "Mon, 12 Dec 2005 16:43:33 %2B0100." <200512121643.39236.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200512121643.39236.max@love2party.net>, 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@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2926.1134402556>