Linux SPARSE checker discussions
 help / color / mirror / Atom feed
* [PATCH] let sparse warn on &inline_function
@ 2006-05-20 14:21 Michael Buesch
  2006-05-20 15:10 ` Derek M Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Buesch @ 2006-05-20 14:21 UTC (permalink / raw)
  To: linux-sparse, Linus Torvalds; +Cc: Johannes Berg

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;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-05-22 10:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-20 14:21 [PATCH] let sparse warn on &inline_function Michael Buesch
2006-05-20 15:10 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox