Re: u64 vs %llu format

From: David Mosberger <>
Date: 2004-02-12 05:47:42
>>>>> 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.

  Grant> I ask because:
  Grant> u64 i;
  Grant> ...
  Grant> printk("i %llu\n, i);

  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.

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 13:56:49 2004

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