This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: array type has incomplete element type


Ralf Corsepius wrote:-

> Technically, it is not obvious to me, why
> extern struct bla array[];
> is different from
> extern struct bla *array;

They are quite different.  One's a pointer, and one isn't.  In the
former case you are telling the compiler that a pointer lives at
location "array" and that some allocation unit allocated room for it,
in the latter case you get a struct bla and there is no pointer
allocated.

Neil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]