From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 2 16:08:48 2014 Return-Path: Delivered-To: freebsd-hackers@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 EB3CA80E; Sun, 2 Nov 2014 16:08:48 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BEAE03D3; Sun, 2 Nov 2014 16:08:48 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-239-104.lns20.per1.internode.on.net [121.45.239.104]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id sA2G8i56019255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 2 Nov 2014 08:08:46 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <54565706.3030103@freebsd.org> Date: Mon, 03 Nov 2014 00:08:38 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: how to kernel printf a int64_t? References: <604180572.3888597.1414894484998.JavaMail.root@uoguelph.ca> <5455A2E3.40808@freebsd.org> <1414900709.17308.243.camel@revolution.hippie.lan> In-Reply-To: <1414900709.17308.243.camel@revolution.hippie.lan> Content-Type: text/plain; charset=ISO-8859-13; format=flowed Content-Transfer-Encoding: 7bit Cc: Freebsd hackers list , Rick Macklem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2014 16:08:49 -0000 On 11/2/14, 11:58 AM, Ian Lepore wrote: > On Sun, 2014-11-02 at 11:20 +0800, Julian Elischer wrote: >> > Which is exactly the explanation for why "some people seem to have a > problem with doing that." "Some people" would be "anyone who thinks it > should be possible to read code as well as write it." This may be more > correct in some pedantic sense, but %j and a cast is more readable. Actually I don't believe that to be true, because casting can actually change the value. (truncation, sign change etc.) If you really want to be sure to see what you should. then use PRImumble... or be sure of what printf is going to do on every architecture your code is going to ever run on in the future.. > -- Ian > > > > >