This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

unnamed fields of type other than struct or union are not allowed


I have a similar construct:

struct test {
	unsigned char :1;

	int            i;
	int            ;
	long           l;
};

and the compiler complains:

somefile.c:line#: unnamed fields of type other than struct or union are not allowed

This used to work with gcc 3.0.4 and before.

Can someone tell me why the bitfield is ok to be unnamed but
the int cannot be unnamed?

Thanks,
--
Luben



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]