From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4248 invoked by alias); 12 Oct 2003 16:00:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4238 invoked from network); 12 Oct 2003 16:00:10 -0000 Received: from unknown (HELO ops2.one-point.com) (216.234.116.146) by sources.redhat.com with SMTP; 12 Oct 2003 16:00:10 -0000 Received: from localhost (jsturm@localhost) by ops2.one-point.com (8.11.6/8.11.6) with ESMTP id h9CG0FK19061; Sun, 12 Oct 2003 12:00:15 -0400 Date: Sun, 12 Oct 2003 16:27:00 -0000 From: Jeff Sturm To: Andrew Morton cc: gcc@gcc.gnu.org Subject: Re: warning when a function's address is tested? In-Reply-To: <20031012050523.486faa69.akpm@osdl.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2003-10/txt/msg00419.txt.bz2 On Sun, 12 Oct 2003, Andrew Morton wrote: > - 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? One legitimate use is to test for undefined weak symbols. That's not an argument against the warning however... more often than not this is surely a mistake. Jeff