lkml.org 
[lkml]   [1999]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Q: void* vs. unsigned long
From
Date

Oliver Xymoron <oxymoron@waste.org> writes:
> But what we need here is "an integral type which can represent all
> possible pointer values".

How about "ptrdiff_t"?

According to K&R[2e], pg 103:

"The header <stddef.h> defines a type ptrdiff_t that is large enough
to hold the signed difference of two pointer values."

So, the unsigned version of whatever type ptrdiff_t is should be large
enough to hold all possible pointer values, no?

--
--------------------------------------------------
Jon 'tex' Boone Senior Network Engineer
ISC Networking University of Pennsylvania
tex@isc.upenn.edu (215) 898-2477

-
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.118 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site