public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: Andrew Morton <akpm@osdl.org>
Cc: gcc@gcc.gnu.org
Subject: Re: warning when a function's address is tested?
Date: Sun, 12 Oct 2003 16:08:00 -0000	[thread overview]
Message-ID: <87fzhyslip.fsf@student.uni-tuebingen.de> (raw)
In-Reply-To: <20031012050523.486faa69.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> writes:

> 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?

Looks like a good idea. The C++ frontend already has this warning, so
it shouldn't be too hard.

-- 
	Falk

  reply	other threads:[~2003-10-12 12:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-12 16:04 Andrew Morton
2003-10-12 16:08 ` Falk Hueffner [this message]
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

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=87fzhyslip.fsf@student.uni-tuebingen.de \
    --to=falk.hueffner@student.uni-tuebingen.de \
    --cc=akpm@osdl.org \
    --cc=gcc@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).