Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2005 09:33:39 +0200
From:      Stefan Farfeleder <stefan@fafoe.narf.at>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Craig Rodrigues <rodrigc@crodrigues.org>, freebsd-current@freebsd.org
Subject:   Re: [GCC 4.0 PATCH] devfs_vnops.c
Message-ID:  <20050526073335.GN596@wombat.fafoe.narf.at>
In-Reply-To: <3631.1117085173@critter.freebsd.dk>
References:  <20050526044824.GA81201@crodrigues.org> <3631.1117085173@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 26, 2005 at 07:26:13AM +0200, Poul-Henning Kamp wrote:
> In message <20050526044824.GA81201@crodrigues.org>, Craig Rodrigues writes:
> 
> >"If, within a translation unit, the same identifier appears with both 
> >internal and external linkage, the behavior is undefined."
> >
> >So, if you have:
> >
> >extern struct foo bar;
> >static struct foo bar = { ..... };
> 
> Well, the reason is it like that is that you cannot forward
> declare a static (at least in the -current GCC)
> 
> 	static struct foo bar;
> 	[...]
> 	static struct foo bare = { ... };
> 
> This might be a bug in C.	

Do you mean the 'warning: redundant redeclaration of ...' warning caused
by -Wredundant-decls?

Stefan



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