This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
unnamed fields of type other than struct or union are not allowed
- From: Luben Tuikov <luben at splentec dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 26 Oct 2002 16:59:28 -0400
- Subject: unnamed fields of type other than struct or union are not allowed
- Organization: Splentec Ltd.
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