C++? when did that happen?

Tim Angus tim at ngus.net
Wed Oct 5 18:29:10 EDT 2005


On Thu, 06 Oct 2005 00:09:03 +0200 Ian wrote:
> > I don't know what makes you think setting a function pointer to 0 is
> > C++, perhaps the syntax for declaring a pure virtual? The compiler
> > that produces the warnings is (q3)lcc, which builds the vm files.
> 
> C has it defined as NULL, while C++ started using 0. But ok if the vm
> compiler is the one then i get it.

C has what defined as NULL? NULL is defined as either 0 or (void *)0
depending on the system, but in practice they're equivalent. When a C
compiler sees a pointer of any type set to 0, it effectively casts the 0
to a type appropriate for the pointer, so it could be argued that 0 is
"better" than (void *)0 which is an explicit cast. It really doesn't
matter though since dereferencing either value is an error.

> > If setting a function pointer to 0 is wrong, setting it to NULL is
> > just as wrong.
> 
> Well, yes and no =)

Yes and yes. This all seems like a rather pointless quibble to be honest
-- it's a non-issue.

> Nope... I still get it with rev 144.

Yes, it is. make distclean or checkout a clean copy and try again.



More information about the quake3 mailing list