delorie.com/archives/browse.cgi | search |
Date: | Thu, 26 Mar 1998 14:50:43 +0100 (MET) |
Message-Id: | <199803261350.OAA25048@tyr.diku.dk> |
From: | Morten Welinder <terra AT diku DOT dk> |
To: | djgpp-workers AT delorie DOT com |
In-reply-to: | <351A0E4B.57F8@rug.ac.be> (message from Vik Heyndrickx on Thu, 26 |
Mar 1998 09:14:03 +0100) | |
Subject: | Re: NULL redefined! :( |
References: | <199803252349 DOT SAA09833 AT delorie DOT com> <351A0E4B DOT 57F8 AT rug DOT ac DOT be> |
__null was introduced by the EGCS people because... 1. "0" doesn't work well on machine for which sizeof (int) != sizeof (void *). 2. "0L" has similar problems. 3. "((void*)0)" doesn't work in C++ because you would have to go cast it all the time. __null is supposed to be a magic r-value that... * works as "0" when compared to any pointer or integer. * has the size of pointers (and thus looks like "((void*)0)" when passed. The only place it should make a difference is with the definition of NULL because the pre-processor doesn't know about __null's semantics. Morten
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |