[LLVMdev] llc c backend can produce code that doesn't compile on gcc 4.x
Nick Lewycky
nicholas at mxc.ca
Mon Jan 15 07:51:07 PST 2007
Eric van Riet Paap wrote:
> *testme.cbe.c:106: error: array type has incomplete element type*
The problem code boils down to:
/* Structure forward decls */
struct l_structtype_s;
/* Typedefs */
typedef struct l_structtype_s l_fixarray_array3[3];
which is illegal C, but perfectly valid C++, and g++ accepts it.
The structure contents are defined right afterwards, but I assume that
the typedefs are used when emitting the structure contents? We may have
to put fully defined structures first and typedefs second.
Nick Lewycky
More information about the llvm-dev
mailing list