This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Anonymous structures in gcc-2.95.1 ?
- To: gcc@gcc.gnu.org
- Subject: Anonymous structures in gcc-2.95.1 ?
- From: Michael Vance <briareos@lokigames.com>
- Date: Tue, 24 Aug 1999 09:49:37 -0700
I browsed the archives for information whether support for anonymous
structures had been added to 2.95, but was only able to find posts
that vaguely referred to code being added, dated sometime in
July. That being the case, some VC code I'm porting fails to compile:
class r_c
{
union {
unsigned k;
struct {
unsigned a :1;
unsigned r :31;
};
};
bool il;
protected:
virtual ~r_c () {};
public:
r_c ();
};
int main( int argc, char* argv[] )
{
return 0;
}
[michael@namaste util]$ make dummy.o
g++ dummy.cpp -c -Wall -I/usr/X11R6/include -I../loki `glib-config
--cflags` -I../render -I../util
dummy.cpp:8: anonymous class type not used to declare any objects
make: *** [dummy.o] Error 1
[michael@namaste util]$
Is support for anonymous structs not in place, and if not, should I
expect it anytime soon? I have a patch against egcs-1.1.1 that
implements it (very small), but it doesn't apply cleanly anymore.
Any info appreciated,
m.
--
"How wonderful! How mysterious Programmer
I carry wood! I draw water!" Loki Entertainment Software
- Anonymous Tao poet