Date: Mon, 22 Nov 1999 05:35:02 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Matthew Jacob <mjacob@feral.com> Cc: Brian Somers <brian@Awfulhak.org>, Cynbe ru Taren <cynbe@muq.org>, bde@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, laurent@off.aspic.com, brian@hak.lan.Awfulhak.org Subject: Re: misc/15002: coredump in sprintf with long long args Message-ID: <Pine.BSF.4.10.9911220522410.8525-100000@alphplex.bde.org> In-Reply-To: <Pine.BSF.4.05.9911211001280.12052-100000@semuta.feral.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 21 Nov 1999, Matthew Jacob wrote: > Should one then cast all actual arguments to (long long)? Will they be the > same on all platforms? In draft C9x, signed integral arguments may be cast to intmax_t for printing portably using %jd. This corresponds to casting them to long in current Standard C, except it is more likely to be pessimal (intmax_t may be very large, much larger than long long). Under FreeBSD, casting quad_t's to long long fixes the problem that %qd isn't suitable for printing quad_t's on the alpha platform. This works even under old versions that don't have %lld, except you must use %qd and that is not good for portabilty. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911220522410.8525-100000>