From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds To: Phil Edwards Cc: gcc@gcc.gnu.org Subject: Re: GCC headers and DJGPP port (OT) Date: Sun, 23 Jul 2000 12:13:00 -0000 Message-id: References: <200007231851.OAA03080@disaster.jaj.com> X-SW-Source: 2000-07/msg00728.html On Sun, 23 Jul 2000, Phil Edwards wrote: > > > 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). > > Funny, that's always been one of my pet peeves about C. :-) Hmm.. In C you _can_ avoid type-checking, but it's not that hard to make it reasonably strongly typed: using gcc the magic flags are "-Wall -Wstrict-prototypes", and some simple rules. You still get all the implicit integer and FP conversions done, and that can be occasionally painful, but not doing them is even more painful, so.. I don't think "void *" is a problem. It just should be used with extreme caution. I think the "enum is a normal integer" thing is a much bigger issue type-checking-wise. Linus