Subject: Re: couple of toolchain questions
To: None <itojun@iijlab.net>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-userlevel
Date: 06/18/2002 14:41:45
itojun@iijlab.net wrote:
> 	(3)
> 	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.
> 		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;
> 	is it safe to commit this?  if so, i would like to.

I think intptr_t/uintptr_t are mean for this kind of thing.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-