From: Michael Buesch <mb@bu3sch.de>
To: linux-sparse@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: [PATCH] let sparse warn on &inline_function
Date: Sat, 20 May 2006 16:21:48 +0200 [thread overview]
Message-ID: <200605201621.48466.mb@bu3sch.de> (raw)
Let sparse warn, if we take pointers to inline functions.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
diff --git a/evaluate.c b/evaluate.c
index 2c70cee..1cf562f 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1297,6 +1297,8 @@ static struct symbol *create_pointer(str
warning(expr->pos, "taking address of 'register' variable '%s'", show_ident(sym->ident));
sym->ctype.modifiers &= ~MOD_REGISTER;
}
+ if (sym->ctype.modifiers & MOD_INLINE)
+ warning(expr->pos, "taking address of 'inline' function '%s'", show_ident(sym->ident));
if (sym->type == SYM_NODE) {
ptr->ctype.as |= sym->ctype.as;
ptr->ctype.modifiers |= sym->ctype.modifiers & MOD_PTRINHERIT;
next reply other threads:[~2006-05-20 14:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-20 14:21 Michael Buesch [this message]
2006-05-20 15:10 ` [PATCH] let sparse warn on &inline_function Derek M Jones
2006-05-20 15:34 ` Michael Buesch
2006-05-20 15:53 ` Derek M Jones
2006-05-21 19:37 ` Jörn Engel
2006-05-21 22:37 ` Derek M Jones
2006-05-22 8:36 ` Jörn Engel
2006-05-22 10:06 ` Derek M Jones
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=200605201621.48466.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=johannes@sipsolutions.net \
--cc=linux-sparse@vger.kernel.org \
--cc=torvalds@osdl.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