From owner-freebsd-current@FreeBSD.ORG Thu May 26 03:43:58 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D61E16A41C for ; Thu, 26 May 2005 03:43:58 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26E9A43D48 for ; Thu, 26 May 2005 03:43:55 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.3/8.13.3) with ESMTP id j4Q3iqfw012170; Wed, 25 May 2005 23:44:52 -0400 (EDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.13.3/8.13.3/Submit) with ESMTP id j4Q3iq1B012167; Wed, 25 May 2005 23:44:52 -0400 (EDT) (envelope-from arr@watson.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Wed, 25 May 2005 23:44:52 -0400 (EDT) From: "Andrew R. Reiter" To: Craig Rodrigues In-Reply-To: <20050526020143.GA80396@crodrigues.org> Message-ID: <20050525234400.H5498@fledge.watson.org> References: <20050526020143.GA80396@crodrigues.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-current@freebsd.org Subject: Re: [GCC 4.0 PATCH] devfs_vnops.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 03:43:58 -0000 On Wed, 25 May 2005, Craig Rodrigues wrote: :Hi, : :When I tried to compile src/sys/fs/devfs/devs_vnops.c :with GCC 4.0, I got the following compilation errors: : :/usr/src/sys/fs/devfs/devfs_vnops.c:1389: error: static declaration of 'devfs_vnodeops' follows non-static declaration :/usr/src/sys/fs/devfs/devfs_vnops.c:114: error: previous declaration of 'devfs_vnodeops' was here :/usr/src/sys/fs/devfs/devfs_vnops.c:1411: error: static declaration of 'devfs_specops' follows non-static declaration :/usr/src/sys/fs/devfs/devfs_vnops.c:115: error: previous declaration of 'devfs_specops' was here : :Apparently, it is not valid C to define something as extern :and then later on static in the same file, like: : :extern struct foo bar; :static struct foo bar = { .... }; : : :What do people think of the following patch to fix it? : :http://people.freebsd.org/~rodrigc/devfs_vnops.c.diff.txt : Is this a GCC-ism or a standards related issue that 4.0 now addresses? -- Andrew R. Reiter arr@watson.org