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: Phil Edwards <pedwards at disaster dot jaj dot com>
- Subject: Re: GCC headers and DJGPP port (OT)
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Sun, 23 Jul 2000 12:12:40 -0700 (PDT)
- cc: gcc at gcc dot gnu dot org
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