BruteForce
Senior Member
Greece
32 Posts |
Posted - Nov 09 2006 : 11:11:57 AM
|
Hi,
It seems that VA does not handle correctly anonymous struct or union members. The sample C code given at the end of this topic compiles OK with the C compiler of VS2005 but VA (a) underlines with a red line the last 3 assignment statements and (b) does not present the Bytes/bytes01/bytes23 names as options in Intellisense when I type "p."; it only presents "StructType".
Regards, Dimitris Staikos
====== SAMPLE CODE STARTS HERE ======
typedef union { struct { char Bytes[4]; }; struct { unsigned short bytes01; unsigned short bytes23; }; } CONTENT;
typedef struct _STRUCTDATA { int StructType; CONTENT; } STRUCTDATA, *PSTRUCTDATA;
int main(int argc, char* argv[]) { STRUCTDATA p; p.StructType = 0; p.Bytes[0] = 0; p.bytes01 = 0; p.bytes23 = 0; return 0; }
|
When all else fails try common sense. |
|