This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC headers and DJGPP port (OT)
- To: gcc at gcc dot gnu dot org
- Subject: Re: GCC headers and DJGPP port (OT)
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Sat, 22 Jul 2000 21:33:22 -0700 (PDT)
In article <200007222029.QAA29095@disaster.jaj.com>,
Phil Edwards <pedwards@disaster.jaj.com> 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