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: GCC headers and DJGPP port (OT)



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


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