[quake3] Re: C++? when did that happen?
pomac at vapor.com
Wed Oct 5 17:52:01 PDT 2005
On Thu, 2005-10-06 at 00:37 +0100, Tim Angus wrote:
> On Thu, 06 Oct 2005 00:55:13 +0200 Ian wrote:
> > In C you do NULL, since NULL could be defined in several ways.
> > Apparently compilers these days workaround such things if you just put
> > 0 there. All i said was that 0 is a C++:ism, which it is.
> > (and it's not like a cast takes time in c)
[Snip: nonusefull stuff ]
Using 0 is a C++:ism since it didn't exist before, but as i said it
doesn't matter since most compilers handles the 0 case as well (since C
++) and does the right thing.
> > A random adress in the variable is much worse since it could
> > theoretically execute code that shouldn't be run and take time to
> > debug.
> If you think 0 is a "random address", /you're/ just plain wrong. Why
> don't you try deferencing a function pointer set to 0 and see what
> happens? May I politely suggest you go and read the C standard? ;)
Sigh, I really thought you'd understand that INITIALIZING it prevent
PS. I said that you was right about this some mails ago but if you keep
misinterpreting me thats up to you and i will reply
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the ioquake3