delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/25/09:31:46

Date: Wed, 25 Mar 1998 17:31:52 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
DJ Delorie <dj AT delorie DOT com>
cc: Peter Palotas <blizzar AT hem1 DOT passagen DOT se>, djgpp-workers AT delorie DOT com
Subject: Re: NULL redefined! :(
In-Reply-To: <m0yHoqi-000S2qC@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.980325172904.26F-100000@is>
MIME-Version: 1.0

On Wed, 25 Mar 1998, Salvador Eduardo Tropea (SET) wrote:

> 1) __null exists only in C++ so __cplusplus is needed.
> 2) Is equivalent to 0, that's:
> 
> a) char *foo=0; then (foo==0) is true.
> b) passing foo to a C module and making (foo==0) in the C code works OK.

Thanks for checking this.

DJ, given these results, where exactly do we risk to break ANSI C 
programs with the following in <stddef.h>:

	#ifdef __cplusplus
	#define NULL __null
	#else
	#define NULL 0
	#endif

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019