From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christopher Li <sparse@chrisli.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>, linux-sparse@vger.kernel.org
Subject: Re: more "unreplaced symbol" warnings
Date: Tue, 31 May 2011 19:58:31 +0100 [thread overview]
Message-ID: <20110531185831.GN11521@ZenIV.linux.org.uk> (raw)
In-Reply-To: <BANLkTi=_0Xe8Fuq9aJ69Zqx3iQYq6E9N5w@mail.gmail.com>
Here's what is actually triggering that crap. Have fun...
#define __u16 unsigned short
static inline __attribute__((__const__)) __u16 f(__u16 val)
{
return val;
}
static inline void barf(unsigned int len)
{
}
static inline unsigned int bar(__u16 n)
{
switch (n) {
case (__builtin_constant_p(1) ? 1 : f(1)):
return 4;
default:
return 0;
}
}
int foo(__u16 n)
{
unsigned int x = bar(n);
barf(bar(n));
return 0;
}
next prev parent reply other threads:[~2011-05-31 18:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-29 21:54 more "unreplaced symbol" warnings Randy Dunlap
2011-05-31 17:39 ` Christopher Li
2011-05-31 18:30 ` Al Viro
2011-05-31 18:58 ` Al Viro [this message]
2011-05-31 19:05 ` Christopher Li
2011-06-01 7:41 ` Christopher Li
2011-08-15 19:34 ` Christopher Li
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=20110531185831.GN11521@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-sparse@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--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 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 NNTP newsgroup(s).