[GCC 4.0 PATCH] devfs_vnops.c
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed May 25 22:26:24 PDT 2005
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.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list