Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.lang.c
Subject: Re: Is #define NULL 0L ok?
Message-ID: <1808@rlgvax.UUCP>
Date: Mon, 12-Mar-84 20:31:07 EST
Article-I.D.: rlgvax.1808
Posted: Mon Mar 12 20:31:07 1984
Date-Received: Tue, 13-Mar-84 20:38:26 EST
References: <4072@edai.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 19

> 	#include 
> 	#undef	NULL
> 	#define	NULL 0L

> This works fine on the VAX, but then so did NULL=0.  Can any
> reader with a ptr=32&int=16 C compiler tell me if this is ok
> for such compilers?

Yes, it works on our compiler.  However, "lint" will *still* yell at
you (it isn't complaining about the size of the object, it's complaining
about its type), it means the code won't work on a 16-bit machine (even
if it would fit) nor will it work on a machine where (to pick a possibly
strange example) pointers and "int"s are 32 bits while "long"s are 64 bits,
and it won't work on a machine where the representation of a null pointer
isn't a string of all zero bits.  Why not just run the code through "lint"
and read and heed its warnings?

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy