Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Structure inside Union. Compiles OK but VAX fails
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

verpies
Junior Member

12 Posts

Posted - Nov 12 2010 :  2:58:11 PM  Show Profile  Reply with Quote
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;

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 13 2010 :  1:25:22 PM  Show Profile  Reply with Quote
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.

Edited by - accord on Nov 13 2010 1:26:02 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 13 2010 :  1:50:21 PM  Show Profile  Reply with Quote
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?

Edited by - accord on Nov 13 2010 1:52:20 PM
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 13 2010 :  1:52:58 PM  Show Profile  Reply with Quote
You have to turn off 'Get content from default Intellisense' in this case to see the members list from VA.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000