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
 Static global anonymous union members not in scope
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

foxmuldr
Tomato Guru

USA
384 Posts

Posted - Oct 18 2016 :  3:57:47 PM  Show Profile  Reply with Quote
// test.cpp

#include <stdio.h>
#include <stdlib.h>

static union {
    int myInteger;
    float myFloat;
};

int main(int argc, char* argv[])
{
    myInteger = 5;
    printf("%f\n", myFloat);
    return 0;
}


Neither myInteger or myFloat show up as auto-suggests when I start typing them, but both are valid and the compiler recognizes them.

License: ... (1-user license) Support ends 2017.02.05
VA_X.dll file version 10.9.2102.0 built 2016.06.02
DevEnv.exe version 10.0.40219.1 Professional
msenv.dll version 10.0.40219.1
Comctl32.dll version 6.10.7601.18837
Windows 7 6.1 Build 7601 Service Pack 1
4 processors (x86-64, WOW64)
Language info: 1252, 0x409

Best regards,
Rick C. Hodgin

ChrisG
Whole Tomato Software

USA
299 Posts

Posted - Oct 18 2016 :  5:47:26 PM  Show Profile  Reply with Quote
Hello foxmuldr,

Thank you for the clear report. I was able to reproduce the issue and have opened case 100820.
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