This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: error: array type has incomplete element type
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Ralf Corsepius <ralf dot corsepius at rtems dot org>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Wed, 2 Feb 2005 22:12:25 +0900
- Subject: Re: error: array type has incomplete element type
- References: <1107346884.5389.442.camel@mccallum.corsepiu.local>
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.