From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6513 invoked by alias); 31 Jan 2003 03:51:05 -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 6506 invoked from network); 31 Jan 2003 03:51:05 -0000 Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173) by 172.16.49.205 with SMTP; 31 Jan 2003 03:51:05 -0000 Received: from nat-pool-rdu.redhat.com ([66.187.233.200] helo=lacrosse.corp.redhat.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18eSCU-000325-00 for gcc@gcc.gnu.org; Thu, 30 Jan 2003 22:50:46 -0500 Received: from livre.redhat.lsd.ic.unicamp.br (aoliva.cipe.redhat.com [10.0.1.10]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id h0V3nbg19783; Thu, 30 Jan 2003 22:49:37 -0500 Received: from livre.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by livre.redhat.lsd.ic.unicamp.br (8.12.7/8.12.7) with ESMTP id h0V3naUa012445; Fri, 31 Jan 2003 01:49:36 -0200 Received: (from aoliva@localhost) by livre.redhat.lsd.ic.unicamp.br (8.12.7/8.12.7/Submit) id h0V3nYC6012441; Fri, 31 Jan 2003 01:49:34 -0200 To: Jan Hubicka Cc: Andrew Morton , gcc@gcc.gnu.org Subject: Re: possible bug References: <3E39BF1D.A0D038EF@digeo.com> <20030131001301.GJ15049@kam.mff.cuni.cz> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Fri, 31 Jan 2003 08:08:00 -0000 In-Reply-To: <20030131001301.GJ15049@kam.mff.cuni.cz> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg01734.txt.bz2 On Jan 30, 2003, Jan Hubicka wrote: >> char *zot(void) >> { >> return ({foo(); 0; }); >> } >> mnm:/home/akpm> /usr/local/gcc-3.2.1/bin/gcc -O -Wall -c t.c >> t.c: In function `zot': >> t.c:10: warning: return makes pointer from integer without a cast >> I think the warning is bogus? > I think the value of ({foo(); 0; }) is zero (value of last statement, > if I recall the definition), so it is corect. But then, zero is a NULL pointer constant, isn't it? At least in C++, a warning would have been very inappropriate. I don't think one for C is. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer