From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 21:30:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 543B39C3; Fri, 31 Oct 2014 21:30:40 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0ED793D7; Fri, 31 Oct 2014 21:30:40 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id v10so7936986pde.22 for ; Fri, 31 Oct 2014 14:30:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=QOzae4tdRYGSi7lxNg78gh+ogXveLpFaYV+R8/06iTI=; b=sHzN4+b0LRqOpFsNN56IusC6+sTQkccXw9EbKeGyQkXYD+O4bAT0kw/qZRl3uN1s0F o7+qtv/JfJawprHycRIfQY9QKK4ZZ9D8dcx/zFAY6s1nULrkKLKt/SCona/wb3VMFN06 4QQ7KSymnlLodCcVQWlNMvm2nIPQEkPuKHqedz//lkCSDm7XDciMUkasQYtewuqUh24h IT0DyvX3kjNr54+iDoMHQ+4PKGdKLxgO9bzG2tyQKErBdaE7rUpjZNBV9gEaNB/B5Ie8 wD8qzW+LzrPBsNEC+iPFJVyic2oPgJB/HaAIwd2Y0v0yt88UuFmciVb7eGhGi8WRby5i d9uA== X-Received: by 10.68.135.65 with SMTP id pq1mr27210329pbb.18.1414791039647; Fri, 31 Oct 2014 14:30:39 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id v4sm4115327pbs.64.2014.10.31.14.30.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 14:30:38 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_537C600A-464D-4B99-B286-17F6C1C194DB"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273734 - head/bin/dd From: Garrett Cooper In-Reply-To: <20141028210830.L1034@besplex.bde.org> Date: Fri, 31 Oct 2014 14:30:37 -0700 Message-Id: References: <201410271138.s9RBcHrA002447@svn.freebsd.org> <20141027153957.GZ1877@kib.kiev.ua> <20141027155427.GM1492@f10.opsec.eu> <86vbn4egjt.fsf@nine.des.no> <20141028200418.E849@besplex.bde.org> <86mw8ged20.fsf@nine.des.no> <20141028210830.L1034@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Kurt Jaeger , Konstantin Belousov , =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2014 21:30:40 -0000 --Apple-Mail=_537C600A-464D-4B99-B286-17F6C1C194DB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 28, 2014, at 4:33, Bruce Evans wrote: > On Tue, 28 Oct 2014, [utf-8] Dag-Erling Sm=F8rgrav wrote: >=20 >> Bruce Evans writes: >>> Dag-Erling Sm=F8rgrav writes: >>>> This is a bug on all platforms, and both clang and (recent) gcc >>>> should complain about it. That printf() call will print garbage. >>> No, this is only a bug on 32-bit arches. The is is SSIZE_MAX. >>=20 >> If you mean "it only has consequences on 32-bit arches", then I agree = - >> but it is still a bug to pass an int to %jd. >=20 > This is machine-dependent. intmax_t may be int. The only requirement > on intmax_t is that it can represent any value of any signed integer > type. This is possible if the largest integer type is 64 bits (the > smallest permitted largest type) and int is also 64 bits (and there > are no complications for padding bits). intmax_t can even be signed > char if that is wide enough (not in POSIX starting 10-15 years ago, > since signed char is now required to be 8 bits. It is weird for > intmax_t to have the lowest rank (not counting Bool), but FreeBSD uses > this loophole to make it have second highest rank on 64-bit arches. Indeed. For some giggles, look at this bug: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D191674 = ("printf("%tu", (intmax_t)-1) returns UINT64_MAX on i386, not = UINT32_MAX=94). Cheers, --Apple-Mail=_537C600A-464D-4B99-B286-17F6C1C194DB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUU/99AAoJEMZr5QU6S73eaPoIAJoklajBANchbv1dj1yHfslz lOOA+QBzOHsVnc/6mncytOZeu2lUxN86n3EnEkRanyzs0csxMZI2DI+BXdBf3SnT 85WyoiBLMgv+7rqdkUc7xWzmRNQl7uV1CK464sFdpv1rYAaVT1gSCkZmXvKQALgg qPiyBUz4M03P8yNT2tiJPPvK1NYw5e8NYatTaR81Qp9NgTUHvSO0s38oQMHziQ2g MhuWhWWOySzF6NhW/dcBOzB5Hzp8Rbwnio8WIcuwy/zlK5Jeozgb+zQulqEP96UK Q+OJ1AMIJ7WNIy17Ts1kRMdVCdJu3lOrquJ8rdy96tppP0wDAeKYUYIRdtXrVZM= =LbDi -----END PGP SIGNATURE----- --Apple-Mail=_537C600A-464D-4B99-B286-17F6C1C194DB--