Subject: Re: bin/7592: programs' error handle broken by good intentions
To: None <gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org>
From: Todd Whitesel <toddpw@best.com>
List: netbsd-bugs
Date: 05/25/1999 22:31:54
> (I.e. the fact that when you pass 0 it is silently co-erced by the
> prototype, but if you pass 1 you'll get the warning "passing arg 2 of
> `err' makes pointer from integer without a cast".)

AFAIK the sneaky behavior of 0 is part of the language -- it's how you
explain the equivalence of code like:

	if (bufp == NULL)

	if (!bufp)

My reading of the ANSI books has always led me to believe that the silent
type-coercion of 0 is intentional, and not implementation defined.

Todd Whitesel
toddpw @ best.com