mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
The construct certain vintages of GCC (the one I have trouble
with is 3.2.3) have trouble with looks like the following:
static struct st a;
static struct st *p = &a;
struct st { int foo; };
static void init(void) { a.foo = 0; }
The problem disappears if we move the struct declaration up to
let the compiler know the shape of the struct before the first
definition uses it, like this:
struct st { int foo; }; /* this has been moved up */
static struct st a;
static struct st *p = &a;
static void init(void) { a.foo = 0; }
|
||
|---|---|---|
| .. | ||
| ash.c | ||
| cmdedit.c | ||
| cmdedit.h | ||
| Config.in | ||
| hush.c | ||
| lash.c | ||
| Makefile | ||
| Makefile.in | ||
| msh.c | ||