public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* warning when a function's address is tested?
@ 2003-10-12 16:04 Andrew Morton
  2003-10-12 16:08 ` Falk Hueffner
  2003-10-12 16:27 ` Jeff Sturm
  0 siblings, 2 replies; 11+ messages in thread
From: Andrew Morton @ 2003-10-12 16:04 UTC (permalink / raw)
  To: gcc


We just found a silly bug in the Linux kernel:

-	if (current_is_kswapd)
+	if (current_is_kswapd())

It was there for a year.  It is a fairly easy mistake to make, and it would
be nice if the compiler could generate a warning.  I don't think there are
likely to be legitimate uses?


void foo(void)
{}

void bar(void)
{}

int main()
{
	if (foo)
		bar();
	return 0;
}

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

end of thread, other threads:[~2003-10-12 18:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-12 16:04 warning when a function's address is tested? Andrew Morton
2003-10-12 16:08 ` Falk Hueffner
2003-10-12 16:57   ` Steven Bosscher
2003-10-12 18:38     ` Zack Weinberg
2003-10-12 23:14       ` Gabriel Dos Reis
2003-10-12 23:58         ` Zack Weinberg
2003-10-13  0:46           ` Gabriel Dos Reis
2003-10-12 16:27 ` Jeff Sturm
2003-10-12 16:46   ` John Levon
2003-10-12 16:56   ` Falk Hueffner
2003-10-12 17:37     ` Jeff Sturm

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 read-only IMAP folder(s) and NNTP newsgroup(s).