Re: [GCC 4.0 PATCH] devfs_vnops.c

From: Stefan Farfeleder <stefan_at_fafoe.narf.at>
Date: Thu, 26 May 2005 09:33:39 +0200
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
Received on Thu May 26 2005 - 05:33:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC