Re: Q: void* vs. unsigned long

Jon 'tex' Boone (tex@isc.upenn.edu)
17 Feb 1999 00:27:01 -0500


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/