Date: Mon, 27 May 1996 05:45:50 -0700 (PDT) From: "Chris J. Layne" <coredump@nervosa.com> To: Bruce Evans <bde@zeta.org.au> Cc: freebsd-bugs@freefall.freebsd.org, jkh@freefall.freebsd.org, scrappy@freefall.freebsd.org Subject: Re: gnu/373 Message-ID: <Pine.BSF.3.91.960527053636.10462A-100000@onyx.nervosa.com> In-Reply-To: <199605270814.SAA28182@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 27 May 1996, Bruce Evans wrote: > Close it and "hope" it was never mentioned. There is no bug. The pointer > dereference is valid. The error message is the same as for > > struct { int i; } foo; void bar(void) { if (foo) baz(); } > > The test would be better written as `if (foo != NULL)'. Then it is obvious > that there is a binary operator `!='. Structs are invalid operands for > '!='. > Bruce Than wouldn't that be illegal? Why not: struct { int i; } foo; void bar(void) { if (foo.i) baz(); } or struct type_1 { int i; } *foo; foo = (struct type_1 *)malloc(sizeof(struct type_1)); void bar(void) { if (foo) baz(); } == Chris Layne ======================================== Nervosa Computing == == coredump@nervosa.com ================ http://www.nervosa.com/~coredump ==
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.960527053636.10462A-100000>