64-bit NULL: a followup

Marcel Moolenaar marcel at xcllnt.net
Fri Nov 28 19:42:02 PST 2003

On Sat, Nov 29, 2003 at 04:18:56AM +0100, Erik Trulsson wrote:
> > 
> > Notice the "st8".  Since NULL is a pointer constant, programmers do
> > (implicitly) expect it to have the same width as a pointer type and
> > thus do not cast it to a pointer type or an integer type that has a
> > width larger or equal to a pointer type.
> Such an expectation is erroneous.  Programmers who have such
> expectations obviously do not know the C language well enough.

Fine. So people suck. The problem is that code is written for
operating systems that allows them to be ignorant and we'd like
that code to run on FreeBSD as well.

The programmers you claim of not having enough knowledge about
the C language do not care what you think of them and in general
do not care much about FreeBSD. Especially if we're going to
knock on their doors telling them that they can't program and
they need to fix their code because it doesn't work for us.

So why not be realistic, come off it and help programmers out?

> Of course, since (0L) is indeed a valid definition of NULL, there is no
> technical reason why you couldn't make that change.

Thanks, this actually is useful information. I do not want to
create an invalid definition in support of broken code, but as
long as we're within the margins I like to have something that
is the most practical (and in my case minimizes the time I need
to spend on fixing broken ports).

 Marcel Moolenaar	  USPA: A-39004		 marcel at xcllnt.net

More information about the freebsd-standards mailing list