From owner-cvs-all Mon Apr 30 23:45:29 2001 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id C55CE37B422; Mon, 30 Apr 2001 23:45:22 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f416j8X00919; Tue, 1 May 2001 08:45:08 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/hpfs hpfs_vnops.c In-Reply-To: Your message of "Tue, 01 May 2001 15:30:28 +1000." Date: Tue, 01 May 2001 08:45:08 +0200 Message-ID: <917.988699508@critter> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Can someone take this up with the GCC people please ? Clearly this is simple enough that you don't need to be a FreeBSD kernel-wiz to deal with it... Poul-Henning In message , Bruce Ev ans writes: >On Tue, 1 May 2001, Poul-Henning Kamp wrote: >> >This is because the pointer was supposed to be, and was, initialized by >> >VOP_BMAP(). gcc must assume that foo(&bar) initializes `bar'. >> >> But VOP_BMAP() was not called in all cases: > >I see. gcc doesn't even spot the error when the function that might >initialize the variable is _never_ called: > >--- >void foo(int *); > >int >main(void) >{ > int x; > > if (0) > foo(&x); > return (x); >} >--- > >Bruce > > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message