From: Linus Torvalds <torvalds@transmeta.com>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc@gcc.gnu.org
Subject: Re: GCC headers and DJGPP port (OT)
Date: Sun, 23 Jul 2000 12:13:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.10007231206320.1760-100000@penguin.transmeta.com> (raw)
In-Reply-To: <200007231851.OAA03080@disaster.jaj.com>
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
next prev parent reply other threads:[~2000-07-23 12:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-23 11:50 Phil Edwards
2000-07-23 12:13 ` Linus Torvalds [this message]
2000-07-23 13:45 ` Akbar A.
-- strict thread matches above, loose matches on Subject: below --
2000-07-23 14:04 Mike Stump
2000-07-23 13:30 Mike Stump
2000-07-23 12:41 Anjul Srivastava
2000-07-23 12:51 ` Mark Mitchell
[not found] <200007230426.VAA26089@neosilicon.transmeta.com>
2000-07-22 21:33 ` Linus Torvalds
2000-07-23 6:19 ` Oleg Zabluda
2000-07-23 7:12 ` Marc Espie
2000-07-23 12:04 ` Linus Torvalds
2000-07-23 16:50 ` Marc Espie
2000-07-23 19:09 ` Alexandre Oliva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.10007231206320.1760-100000@penguin.transmeta.com \
--to=torvalds@transmeta.com \
--cc=gcc@gcc.gnu.org \
--cc=pedwards@disaster.jaj.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).