Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Structure inside Union. Compiles OK but VAX fails

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
verpies Posted - Nov 12 2010 : 2:58:11 PM
This compiles fine as a plain C file under VisualStudio v10.0.30319 and VAX v10.6.1833.0 but VAX does not see the members of the struct.

I know that typedef inside typedef is weird, but it does not seem to bother the VS compiler. Only VAX frowns upon it.

typedef union tagMYRGBQUAD {
  typedef struct {
  unsigned char  rgbRed;
  unsigned char  rgbGreen;
  unsigned char  rgbBlue;
  unsigned char  rgbAlpha;
  };
  unsigned int   AllChannels;
} MYRGBQUAD, *PMYRGBQUAD;


MYRGBQUAD MyPixel[2];

MyPixel[0].AllChannels = 0;
MyPixel[1].rgbRed = 0xAA;
MyPixel[1].rgbGreen = 0xCC;
MyPixel[1].rgbBlue = 0xBB;
MyPixel[1].rgbAlpha = 0x80;
3   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Nov 13 2010 : 1:52:58 PM
You have to turn off 'Get content from default Intellisense' in this case to see the members list from VA.
accord Posted - Nov 13 2010 : 1:50:21 PM
No, I was wrong. Those red squiggles mislead me. VA seems to understand what's going on. Those wavy lines are actually used by VS intellisense in VS2010. I get suggestions from VA and I see the correct thing on the navigation bar when I click on a member.



The transparent VA icons in the listbox indicate that these items come from VA parser.
Are you seeing the same effect there?
accord Posted - Nov 13 2010 : 1:25:22 PM
I am seeing the same effect here. Thank you for the very clear description.

case=52262

Anyway, VS2010's intellisense also frowns upon it even in a c file.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000