lkml.org 
[lkml]   [2004]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch] u64 casts
>>>>> On 27 Feb 2004 15:58:42 -0500, Albert Cahalan <albert@users.sourceforge.net> said:

Albert> Casts are considered harmful, because they bypass
Albert> type checking, but how do you print a u64 value?
Albert> You cast it to "unsigned long long" like this:

Albert> printk("%llu\n", (unsigned long long)foo);

Albert> Well, this is silly and ugly. As x86-64 has shown,
Albert> even a 64-bit port can use "long long" for 64-bit
Albert> values. This patch changes all other 64-bit ports.
Albert> It now becomes possible to avoid adding new casts
Albert> all over the place; existing ones may be removed
Albert> if so desired.

Did you verify that none of the kernel header files that are still
being used by glibc contain declarations based on __u64 or __s64? If
not, your patch breaks user-level code.

--david
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.224 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site