From: Linus Torvalds <torvalds@linux-foundation.org>
To: Christopher Li <sparse@chrisli.org>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>,
Sparse <linux-sparse@vger.kernel.org>,
Josh Triplett <josh@freedesktop.org>
Subject: Re: [PATCH] Re: Sparse just seg faulted on me!
Date: Wed, 14 Feb 2007 12:48:17 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0702141242460.20368@woody.linux-foundation.org> (raw)
In-Reply-To: <20070214195447.GA18753@chrisli.org>
On Wed, 14 Feb 2007, Christopher Li wrote:
> >
> > It's nice if a NULL type means "type has not been evaluated yet", and then
> > using "&bad_ctype" to mean "type evaluated to crap".
>
> Good idea. Some of the code already doing that.
Yeah. I started out leaving bad stuff as NULL originally, but over time,
as I noticed SIGSEGV's, I mostly changed the ones that I ended up having
trigger to &bad_ctype.
Otherwise we either need to test for NULL all the time (and especially
since NULL under _some_ circumstances is ok and means "not evaluated yet",
that can be confusing), and having to pass up errors higher and higher up.
I at some point considered having a "silent bad_ctype" - a way of saying
"ok, the type here is bad, but I already warned about the thing that
_caused_ it to be bad, so don't warn any more about any type clashes".
But I don't think I ever did that, so now you often get two different
warnings (first a warning about "no such symbol" or something and then a
warning about "bad types to binary operation" or similar). Anyway, if
somebody ever gets irritated about the duplicate warnings, I thought I'd
mention that as a potential way to perhaps avoid havign things that
already caused errors cause even more verbose errors up the chain..
Linus
next prev parent reply other threads:[~2007-02-14 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-14 9:04 Sparse just seg faulted on me! Anton Altaparmakov
2007-02-14 17:29 ` [PATCH] " Christopher Li
2007-02-14 18:24 ` Linus Torvalds
2007-02-14 19:54 ` Christopher Li
2007-02-14 20:18 ` Christopher Li
2007-02-23 2:25 ` Josh Triplett
2007-02-14 20:48 ` Linus Torvalds [this message]
2007-02-14 20:36 ` Christopher Li
2007-02-23 2:42 ` Josh Triplett
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.64.0702141242460.20368@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=aia21@cam.ac.uk \
--cc=josh@freedesktop.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sparse@chrisli.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.