Subject: Re: couple of toolchain questions
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 06/18/2002 11:00:28
> 	there seem to be pointer-casting bug (or portability issue) in
> 	GNU toolchain.  they try to cast void * (or whatever pointer) to
> 	unsigned long long, under certain configuration, and it fails to
> 	compile.

Is there any guarantee that _any_ integer type is large enough to hold
a pointer without loss of information?  I'm pretty sure there isn't in
second-edition K&R C (which is fairly close to the first ANSI/ISO C)...

> 		void *p;
> 		unsigned long long x;
> 		x = (unsigned long long)p;
> 	i've modified my local tree as below, basically doing:
> 		x = (unsigned long long)(unsigned long)p;

Are there machines where pointers are larger than long but not as large
as long long?  If so, that loses information unnecessarily....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B