Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2001 11:50:34 -0700
From:      "David O'Brien" <obrien@FreeBSD.ORG>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        Matthew Jacob <mjacob@feral.com>, freebsd-current@FreeBSD.ORG
Subject:   Re: chgrp broken on alpha systems
Message-ID:  <20010707115034.D16759@dragon.nuxi.com>
In-Reply-To: <20010706163743.D506@gsmx07.alcatel.com.au>; from peter.jeremy@alcatel.com.au on Fri, Jul 06, 2001 at 04:37:43PM %2B1000
References:  <20010706150804.B506@gsmx07.alcatel.com.au> <Pine.BSF.4.21.0107052211560.37078-100000@beppo> <20010706163743.D506@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 06, 2001 at 04:37:43PM +1000, Peter Jeremy wrote:
> >On i386, 'gcc -fsyntax-only -Wall x.c' produces no error. On
> >NetBSD/alpha (same compiler, really), this produces:
> >
> >x.c: In function `func':
> >x.c:4: warning: cast from pointer to integer of different size
> >
> >It'd be *really* nice if we could add a flag where such errors could be
> >checked for and emitted for an i386 build.
> 
> David would know for certain, but I think this is messy to detect.  As
> I see it, the problem is that when casting a pointer type to an
> integer type, gcc only looks at the lengths of the types - on an i386,
> sizeof(int) == sizeof(long) == sizeof(void *), whereas on an Alpha,
> sizeof(int) != sizeof(long) == sizeof(void *).  Whilst it is possible
> to change the check so that it verifies that the integer type is
> `long' (or longer), this may cause other problems.

Correct.
 
-- 
-- David  (obrien@FreeBSD.org)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010707115034.D16759>