From owner-freebsd-current Sat Jul 7 11:50:38 2001 Delivered-To: freebsd-current@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id B755437B405 for ; Sat, 7 Jul 2001 11:50:35 -0700 (PDT) (envelope-from obrien@nuxi.ucdavis.edu) Received: from dragon.nuxi.com (root@trang.nuxi.com [206.40.252.115]) by relay.nuxi.com (8.11.2/8.11.2) with ESMTP id f67IoZR18320; Sat, 7 Jul 2001 11:50:35 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.3/8.11.1) id f67IoYC16923; Sat, 7 Jul 2001 11:50:34 -0700 (PDT) (envelope-from obrien) Date: Sat, 7 Jul 2001 11:50:34 -0700 From: "David O'Brien" To: Peter Jeremy Cc: Matthew Jacob , freebsd-current@FreeBSD.ORG Subject: Re: chgrp broken on alpha systems Message-ID: <20010707115034.D16759@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG References: <20010706150804.B506@gsmx07.alcatel.com.au> <20010706163743.D506@gsmx07.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010706163743.D506@gsmx07.alcatel.com.au>; from peter.jeremy@alcatel.com.au on Fri, Jul 06, 2001 at 04:37:43PM +1000 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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