[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#299699: dpkg: FTBFS (amd64/gcc-4.0): array type has incomplete element type



tag 299699 - patch
thanks

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.
>
> When building 'dpkg' on amd64 with gcc-4.0,
> I get the following error:
>
> gcc  -g -O2  -Wall  -Wwrite-strings -Wpointer-arith -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wcast-qual -Wcast-align -Winline -Wmissing-noreturn -Wsign-compare -DHAVE_CONFIG_H -D_GNU_SOURCE -DLOCALEDIR=\"/usr/share/locale\" -I../../intl -I../intl -I../../include -I../.. -I../../lib -I../include -I.. -I. -I../../optlib -DUSE_ZLIB -DUSE_BZ2LIB -DCOPYINGFILE=\"/usr/share/doc/dpkg/copyright\" -c ../../lib/dump.c
> In file included from ../../lib/dump.c:37:
> ../../include/parsedump.h:33: error: array type has incomplete element type
> ../../lib/dump.c: In function 'w_charfield':
> ../../lib/dump.c:95: warning: cast discards qualifiers from pointer target type
> ../../lib/dump.c: In function 'w_booleandefno':
> ../../lib/dump.c:133: warning: cast discards qualifiers from pointer target type
> make[3]: *** [dump.o] Error 1
> make[3]: Leaving directory `/dpkg-1.10.27/build/lib'
>
> With the attached patch 'dpkg' can be compiled
> on amd64 using gcc-4.0.
>
> The attached patch includes the patch from BTS bug #282669. This part has
> already been applied to 'experimental' (thanks!).
>
> Regards
> Andreas Jochens

I don't agree with the patch; move the struct definition.



Reply to: