Re: u64 vs %llu format

From: Grant Grundler <>
Date: 2004-02-12 06:26:20
On Wed, Feb 11, 2004 at 10:47:42AM -0800, David Mosberger wrote:
> >>>>> On Wed, 11 Feb 2004 10:17:30 -0800, Grant Grundler <> said:
>   Grant> Why is __u64 defined as "unsigned long" and not "unsigned long long"?
> Because that's the way it is for pretty much every other 64-bit
> UNIX-like platform.  64-bit UNIX/Linux platforms existed long before
> "long long" was widely supported.

ok. I initially read this as "64-bit unix source compat is more important
than ILP32-linux compat". But that's not a fair statement since it implies
alot more than this silly %llu vs u64 issue.

>   Grant> will generate this warning:
>   Grant> <file>:<line>: warning: long long unsigned int format, __u64 arg (arg 2)
> Just cast "i" to (unsigned long long) and the code will be fine.

Yes, or use "unsigned long long" instead of u64 in the first place.
I'll try to convince the code owner to only use "u64" for stuff
representing HW or other "shared" data structures. The distinction
is artificial since both are the same size on LP64 platforms.
But it would reduce the number of warnings we need to fix.

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Wed Feb 11 14:30:01 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:22 EST