From owner-freebsd-arch Tue Aug 20 18:45: 8 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3FCF37B400; Tue, 20 Aug 2002 18:45:03 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C14543E65; Tue, 20 Aug 2002 18:45:03 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id SAA88241; Tue, 20 Aug 2002 18:33:44 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g7L1X0N03964; Tue, 20 Aug 2002 18:33:00 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200208210133.g7L1X0N03964@arch20m.dellroad.org> Subject: Re: NULL In-Reply-To: <20020821012901.GA34047@dragon.nuxi.com> "from David O'Brien at Aug 20, 2002 06:29:01 pm" To: obrien@freebsd.org Date: Tue, 20 Aug 2002 18:33:00 -0700 (PDT) Cc: freebsd-arch@freebsd.org X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David O'Brien writes: > > > In C++ this is not legal: > > > > > > void blah(void) { > > > int *foo; > > > void *bar; > > > bar = foo; > > > foo = bar; > > > } > ... > > When you say "not legal" do you mean it causes an error or a warning? > > Easy enought to try yourself (/void blah/int main/ and add return 0;) :-) > > $ ls -l a.out > ls: a.out: No such file or directory > $ CC voidp.cxx > voidp.cxx: In function `int main()': > voidp.cxx:6: invalid conversion from `void*' to `int*' > $ ls -l a.out > ls: a.out: No such file or directory Thanks... So how does C++ on Linux get away with (void *)0? -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message