gcc 2.95/C: flexible array member as error, breaks ISO C

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Mon Feb 14 14:47:00 GMT 2000


> This seems to be a bug in gcc's ISO/ANSI C compliance.

Thanks for your bug report. I believe this is a known bug, since this
feature is new in C 99, right? Please have a look at

http://gcc.gnu.org/c9xstatus.html

Flexible array members are currently missing in gcc; as a work-around,
you can use array of zero length:

typedef struct {
	int*			srv_status_table;
	int*			srv_pkid_table;
	int			num_busy_srv;
	double			q_cum_pks;
	double			q_cum_bits;
	List*			in_queue[15];
	int 			num_intf;
	ClnpT_MacIf		mac_intf_tbl[0];
	} AcT_Clnp_Data;

> Please contact me for any further details.

Thanks; unless I misinterpreted your report, we don't need more
details at the moment. Of course, if you are willing to provide a
patch to add the missing feature - that would be much
appreciated. Please send them to gcc-patches@gcc.gnu.org.

Regards,
Martin


More information about the Gcc-bugs mailing list