This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ definition of NULL


---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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]