[GCC 4.0 PATCH] devfs_vnops.c

Stefan Farfeleder stefan at fafoe.narf.at
Thu May 26 00:33:46 PDT 2005


On Thu, May 26, 2005 at 07:26:13AM +0200, Poul-Henning Kamp wrote:
> In message <20050526044824.GA81201 at 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


More information about the freebsd-current mailing list