This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ definition of NULL
- To: Chad Gatesman <chadg at redrose dot net>
- Subject: Re: C++ definition of NULL
- From: Martin Knoblauch <knobi at rocketmail dot com>
- Date: Tue, 2 Mar 1999 23:03:47 -0800 (PST)
- Cc: egcs at cygnus dot com
- Reply-To: knobi at knobisoft dot de
---Chad Gatesman <chadg@redrose.net> wrote:
>
> Doug Semler wrote:
>
> > You should cast, you shouldn't implicitely convert pointers to
integers any
> > more.... :)
>
> The standard does not say this. If NULL is defined as they
suggested, one
> would be able to be implicitly casted to a long. I would hate to
have to go
> thru 1 million+ lines of code just to cast all occurances of NULL
and force
> users of the library to do the same.
>
Hmm. Are you now assuming that sizeof(long) == sizeof(void *)?
What if the IA64 Unixes come out as LL-P-64, leaving "long" at
32 bit to make porting M$ legacy software easier? While it is
a hassle in the short term, explicitely casting will make things
easier in the long run.
Martin
===
------------------------------------------------------
Martin Knoblauch
email: knobi@knobisoft.de or knobi@rocketmail.com
www: http://www.knobisoft.de
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com