organix / tart

Tiny Actor Run-Time
MIT License
12 stars 3 forks source link

struct integer definition is completed prior to extern usage #1

Closed tristanls closed 11 years ago

tristanls commented 11 years ago

Clang compiler gives the following error

cc -I../inc -c actor.c
In file included from actor.c:31:
../inc/number.h:43:30: error: array has incomplete element type 'INTEGER' (aka 'struct integer')
extern INTEGER small_integers[2*N_SMALL + N_SMALL];
                             ^
../inc/number.h:35:16: note: forward declaration of 'struct integer'
typedef struct integer INTEGER, *Integer;
               ^
1 error generated.
make: *** [actor.o] Error 1

Moving struct integer definition prior to extern usage resolves the issue.