Date: Tue, 20 Aug 2002 18:29:01 -0700 From: "David O'Brien" <obrien@freebsd.org> To: Archie Cobbs <archie@dellroad.org> Cc: freebsd-arch@freebsd.org Subject: Re: NULL Message-ID: <20020821012901.GA34047@dragon.nuxi.com> In-Reply-To: <200208210101.g7L110m03801@arch20m.dellroad.org> References: <20020821002116.GA33223@dragon.nuxi.com> <200208210101.g7L110m03801@arch20m.dellroad.org>
index | next in thread | previous in thread | raw e-mail
On Tue, Aug 20, 2002 at 06:01:00PM -0700, Archie Cobbs wrote:
> > 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
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821012901.GA34047>
