lkml.org 
[lkml]   [1999]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Q: void* vs. unsigned long
Date
In article <linux.kernel.36C900C8.EB3C534F@quark.vpplus.com>,
Brian Gerst <bgerst@quark.vpplus.com> wrote:
>H. Peter Anvin wrote:
>> Actually, it will. sizeof(unsigned long) == sizeof(void *) == 8 on
>> 64-bit architectures.
>
>I thought it was int that changed with the word size of the
>architecture, not long. Most C books I've seen said long is always 32
>bits regardless of the word size.

They're wrong. The only constraint on the size of long (and I may
be making this up) is that sizeof(short) <= sizeof(int) <= sizeof(long)
(presumably the proprietary-but-about-to-be-standard long long will
have the constraint of sizeof(long) <= sizeof(long long), but here I
AM making things up.)

____
david parsons \bi/ sizeof long == 32 bits? Oh, my, those authors are
\/ going to have an expensive portability lesson.

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

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