struct Foo
{
struct Bar bar;
};
Quote from: pocc -c test.ctest.c(4): error #2132: Size of '(incomplete) struct Foo' exceeds 2147483647 bytes.
With typedefs it is even more confusing (no "incomplete" word).
I meant
struct Bar *bar obviously, and as the structure is pretty large it took me a while to understand what's wrong. Maybe a compiler should say something like
Undefined size for 'bar' with type '(incomplete) struct Bar'. as it does when I try to define a variable of incomplete type?
Hmm... I can't find a decent check for incomplete struct/union member types at all (not even in the original, very old, code). It's in a long complicated function, which has become longer and more complicated with C99 and C11 changes... The error you get is more or less by accident.
Sounds like a rather major bug...
I will have to investigate...