Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

illegal declaration of anonymous 'struct'

1 view
Skip to first unread message

Miki Peric

unread,
May 26, 2004, 4:52:04 AM5/26/04
to

While compiling some sources using VC6, I got this error:

C:\Program Files\Microsoft SDK\include\winnt.h(477) : error C2467: illegal
declaration of anonymous 'struct'

This is line of the code:

typedef union _LARGE_INTEGER {
struct {
DWORD LowPart;
LONG HighPart;
};
struct {
DWORD LowPart;
LONG HighPart;
} u;
#endif //MIDL_PASS
LONGLONG QuadPart;
} LARGE_INTEGER;

I belive there is some switch to disable this error?


John Carson

unread,
May 26, 2004, 5:23:43 AM5/26/04
to
"Miki Peric" <bl...@ccc.com> wrote in message
news:uRrJ46vQ...@TK2MSFTNGP11.phx.gbl

Anonymous structs are a Microsoft extension which you probably have disabled
using /Za. If memory serves, you set this in the IDE under

Project Settings -> C/C++ ->Custom (in the list box)

It is somewhere around there anyway. There is a checkbox that you need to
either check or uncheck.


--
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)

Miki Peric

unread,
May 26, 2004, 6:34:41 AM5/26/04
to

Thank you.


0 new messages