From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds To: gcc@gcc.gnu.org Subject: Re: GCC headers and DJGPP port (OT) Date: Sat, 22 Jul 2000 21:33:00 -0000 Message-id: References: <200007230426.VAA26089@neosilicon.transmeta.com> X-SW-Source: 2000-07/msg00709.html In article < 200007222029.QAA29095@disaster.jaj.com >, Phil Edwards wrote: > >Having __null magically only match pointer types is an extremely froody >solution, and I'm glad that g++ went that route. Off-topic: why is it exactly that C++ doesn't like the "((void *)0)" thing, which as far as I can tell has all the same advantages? Was it purely a "stupid standard" issue, or is there some actual real deeper reason for it? That was one of my pet peeves about C++: I always considered the historical "#define NULL 0" to be complete braindamage due to lack of even the simplest kind of type-checking (and matching to a pointer type is just one small portion of that type-checking - getting sane and appropriate warnings is quite important). And C++ made the ANSI-C-approved "((void *)0)" define illegal for some reason that I still haven't quite grasped. Gcc used to have the "don't complain" extension for some time, and now we've moved to "__null". What were the issues, just out of morbid curiosity? Or am I better off not knowing? Linus