Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2005 23:44:52 -0400 (EDT)
From:      "Andrew R. Reiter" <arr@watson.org>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: [GCC 4.0 PATCH] devfs_vnops.c
Message-ID:  <20050525234400.H5498@fledge.watson.org>
In-Reply-To: <20050526020143.GA80396@crodrigues.org>
References:  <20050526020143.GA80396@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050525234400.H5498>