The attached files can be compiled in gcc as:

> gcc -c test.c -include test.h

The same invocation of cilly, however, fails.

The invocation of cilly:

> cilly -c test.c -include test.h

Results in (essentially) the following sequence of events:

gcc -E -include test.h test.c -o tmp1.i
cilly.asm.exe tmp1.i --out tmp2.cil.c
gcc -E -include test.h tmp2.cil.c -o tmp3.cil.i
gcc -c -include test.h tmp3.cil.i -o test.o

  I would suggest that neither the second (is it
even needed?) nor the third invocation of gcc
should have the "-include" directive.

  I am using CIL 1.5.1.

-- test.c --------------------

int foo(struct kernel_param *k) {
  return k->len;
}

-- test.h --------------------

struct kernel_param {
    const char *name;
    enum {
        OPT_STR,
        OPT_UINT,
        OPT_BOOL,
        OPT_INVBOOL,
        OPT_SIZE,
        OPT_CUSTOM
    } type;
    void *var;
    unsigned int len;
};