This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: binutils question
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: itojun at iijlab dot net
- Cc: binutils at sources dot redhat dot com, thorpej at netbsd dot org
- Date: Wed, 19 Jun 2002 14:59:43 +0930
- Subject: Re: binutils question
- References: <20020618154002.0FC1A4B24@coconut.itojun.org>
On Wed, Jun 19, 2002 at 12:40:02AM +0900, itojun@iijlab.net wrote:
> please see (3) in the first attachment. when bfd_vma is 64bit and
> host is 32bit, there are problematical typecasts like:
> unsigned long long x;
> void *p;
> x = (unsigned long long)p;
> gcc does not like this as sizeof(p) != sizeof(x). how should we
> address this problem? first attachment includes workaround patch,
> assuming that "sizeof(void *) <= sizeof(unsigned long)". basically
> the patch does the following.
> x = (unsigned long long)(unsigned long)p;
By "gcc does not like" you mean gcc generates bad code or gives
fatal errors? I think it's just a warning that can be ignored.
--
Alan Modra
IBM OzLabs - Linux Technology Centre