Notice: We have migrated to GitLab launching 2024-05-01 see here:

#755 closed defect (fixed)

GCC-4.0 error: array type has incomplete element type

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: highest Milestone: 2
Component: score Version: unknown
Severity: critical Keywords:
Cc: bugs@…, ralf.corsepius@… Blocked By:


Making all in libnetworking
gmake[2]: Entering directory `/users/rtems/src/rtems-cvs/build/m68k/m68k-rtems4.7/c/idp/cpukit/libnetworking'
if m68k-rtems4.7-gcc --pipe -DHAVE_CONFIG_H -I.. -I../../cpukit/../../../idp/lib/include -I../../../../../../../rtems.orig/c/src/../../cpukit/libnetworking -D_COMPILING_BSD_KERNEL_ -DKERNEL -DINET -DNFS -DDIAGNOSTIC -DBOOTP_COMPAT -D_KERNEL -DBSD_VISIBLE -Wall -fasm -msoft-float -O4 -fomit-frame-pointer -MT kern/libnetworking_a-kern_mib.o -MD -MP -MF "kern/.deps/libnetworking_a-kern_mib.Tpo" -c -o kern/libnetworking_a-kern_mib.o test -f 'kern/kern_mib.c' || echo '../../../../../../../rtems.orig/c/src/../../cpukit/libnetworking/'kern/kern_mib.c; \
then mv -f "kern/.deps/libnetworking_a-kern_mib.Tpo" "kern/.deps/libnetworking_a-kern_mib.Po"; else rm -f "kern/.deps/libnetworking_a-kern_mib.Tpo"; exit 1; fi
In file included from ../../cpukit/../../../idp/lib/include/sys/systm.h:45,

from ../../../../../../../rtems.orig/c/src/../../cpukit/libnetworking/kern/kern_mib.c:49:

../../cpukit/../../../idp/lib/include/rtems/rtems_bsdnet_internal.h:165: error: array type has incomplete element type
gmake[2]: * [kern/libnetworking_a-kern_mib.o] Error 1

The code breaks on constructs like these
extern struct mystruct array[];
with struct mystruct not having been completely defined.

As I understand it support for open arrays with incomplete "structs" has been removed from GCC some time between 20050125 and 20050201.

The rationale behind this excapes me, however GCC's new behavior breaks RTEMS at various places.

I'll try to investigate on gcc@

GCC-4.0 >= 20050201

Change History (2)

comment:1 Changed on 02/05/05 at 03:05:45 by Ralf Corsepius

Status: assignedwaiting

comment:2 Changed on 02/08/05 at 02:05:16 by Ralf Corsepius

Status: waitingclosed

State-Changed-From-To: feedback->closed
State-Changed-Why: patches applied to 4.7.
WONTFIX on 4.6

Note: See TracTickets for help on using tickets.