Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Nov 2014 00:08:38 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>, Rick Macklem <rmacklem@uoguelph.ca>
Subject:   Re: how to kernel printf a int64_t?
Message-ID:  <54565706.3030103@freebsd.org>
In-Reply-To: <1414900709.17308.243.camel@revolution.hippie.lan>
References:  <604180572.3888597.1414894484998.JavaMail.root@uoguelph.ca>	 <5455A2E3.40808@freebsd.org> <1414900709.17308.243.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
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
>
>
>
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54565706.3030103>