From: Al Viro <viro@ftp.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-sparse@vger.kernel.org
Subject: comparison of safe pointers
Date: Fri, 25 May 2007 14:07:49 +0100 [thread overview]
Message-ID: <20070525130749.GI4095@ftp.linux.org.uk> (raw)
Why do we generate a warning when we compare two pointers
declared as safe? I understand why we do that when such beast gets
used as condition (i.e. implicitly compare with NULL), but what's
wrong with
int foo(void __safe *p, void __safe *q)
{
return p == q;
}
What did you want that check in evaluate_compare() to catch? Is that
about warning on explicit comparison with NULL?
Al, crawling through evaluate.c and fixing odd cases in typechecking...
next reply other threads:[~2007-05-25 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 13:07 Al Viro [this message]
2007-05-25 15:29 ` comparison of safe pointers Linus Torvalds
2007-05-25 15:44 ` Al Viro
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=20070525130749.GI4095@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=torvalds@linux-foundation.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.