Comment 3 for bug 15293

Revision history for this message
In , Scott James Remnant (Canonical) (canonical-scott) wrote : Re: Bug#299699: dpkg: FTBFS (amd64/gcc-4.0): array type has incomplete element type

On Tue, 2005-03-15 at 17:48 -0600, Adam Heath wrote:

> On Tue, 15 Mar 2005, Andreas Jochens wrote:
>
> > the latest version of gcc-4.0 is even more restrictive than the previous
> > ones. There is a new error message 'array type has incomplete element type'
> > for constructs like 'extern struct st x[];' when 'struct st' has not
> > been defined.
> >
> > The attached patch includes the patch from BTS bug #282669. This part has
> > already been applied to 'experimental' (thanks!).

> I don't agree with the patch; move the struct definition.
>
The fieldinfo struct definition includes members of a function typedef
which have struct fieldinfo pointers as arguments.

Moving the definition of the extern arrays to the bottom of the file
(while retaining the fieldinfo struct prototype at the top) is the right
solution.

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?