I have a question about forward declarations in C. The problem code is
typedef struct yhash_s t_yhash; // forward declaration
struct yhash_s {
size_t size_h;
t_yhash (*yhash)[]; // pointer to array of structures
};
Once the code is compiled with gcc, it complains:
error: array type has incomplete element type ‘t_yhash’ {aka ‘struct yhash_s’}
I do understand that t_yhash is not know (yet) and size of array can't be computed, but I am asking about pointer to an array of unknown yet size, which should be perfectly resolvable IMHO.
How do I fix that forward declaration and struct itself?