Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 25 Jan 2002 02:59:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 25 Jan 2002 02:59:48 -0500 Received: from sun.fadata.bg ([80.72.64.67]:7684 "HELO fadata.bg") by vger.kernel.org with SMTP id ; Fri, 25 Jan 2002 02:59:31 -0500 To: Alexander Viro Cc: Xavier Bestel , timothy.covell@ashavan.org, Robert Love , Oliver Xymoron , "Richard B. Johnson" , Jeff Garzik , Linux Kernel Mailing List Subject: Re: RFC: booleans and the kernel In-Reply-To: X-No-CC: Reply to lists, not to me. From: Momchil Velikov In-Reply-To: Date: 25 Jan 2002 10:00:45 +0200 Message-ID: <877kq6amhe.fsf@fadata.bg> Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Alexander" == Alexander Viro writes: >> > int main() >> > { >> > char x; >> > >> > if ( x ) >> > { >> > printf ("\n We got here\n"); >> > } >> > else >> > { >> > // We never get here >> > printf ("\n We never got here\n"); >> > } >> > exit (0); >> > } >> > covell@xxxxxx ~>gcc -Wall foo.c >> > foo.c: In function `main': >> > foo.c:17: warning: implicit declaration of function `exit' >> >> I'm lost. What do you want to prove ? (Al Viro would say you just want >> to show you don't know C ;) >> And why do you think you never get there ? Alexander> I suspect that our, ah, Java-loving friend doesn't realize that '\0' is Alexander> a legitimate value of type char... Alexander> BTW, he's got a funny compiler - I would expect at least a warning about Alexander> use of uninitialized variable. That warning would require data-flow analysis (reachable definitions in this case), which is not enabled with certain levels of optimization. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/