The following code is legal ANSI C, but SDCC fails to
compile it:
typedef struct foo foo;
struct foo
{
int bar;
};
The error returned is
syntax error: token -> 'foo' ; column 10
Expected behaviour: compile with no error.
(The struct tag name space and the general symbol name
space, where the typedef goes, are separate. Typedefs
like this keep the two name spaces in synch. The
forward declaration of the struct means that you can
use the typedef inside the struct itself, eg for
pointer to self in linked lists, whithout the struct
keyword.)
My version of SDCC is
SDCC :
mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.5.0 #1020 (Oct 18 2006) (UNIX)
Fixed in SDCC 2.9.7 #5897.