Invalid use of incomplete type

Started by jiake, November 18, 2014, 09:03:34 AM

Previous topic - Next topic

jiake

A structure including a zero element array can be compiled by Pelles C 7.00.355 (x64):
typedef struct {
    int dummy;
    int data[];
} DUMMY_STRUCT;

But a structure with a union including zero element array can't be compiled by Pelles C 7.00.355 (x64):
typedef struct {
    int dummy;
    union {
        int padding;
        int data[];
    };
} DUMMY_STRUCT;

Got an error message:
Quoteerror #2065: Invalid use of incomplete type 'int []'.
I only found one such structure named WNODE_ALL_DATA in "wmistr.h" header until now.

TimoVJL

May the source be with you

jiake


frankie

It works.
The error should be not in the declaration, but in the usage of the struct.
Post a compilable short piece of code to check.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

jiake

#4
See the attachment

frankie

Upgrade to PellesC V.8.00 RC6
It will solve also SQLITE compiling problem.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide