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
 BUG:VA fails to parse preprocessor #define
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

codex
New Member

USA
2 Posts

Posted - May 08 2020 :  3:39:17 PM  Show Profile  Reply with Quote
quote:
VA_X.dll file version 10.9.2332.2 Atmel built 2019.05.20
AtmelStudio
msenv.dll version 14.0.23107.0
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


VA will recognize the following code just fine:
struct MyStuct
{
    struct __attribute__ ((packed))
    {
        unsigned flag1 : 1;
        unsigned flag2 : 1;
        unsigned flag3 : 1;
        unsigned flag4 : 1;
        unsigned flag5 : 1;
    };
    // Additional members to follow
};

VA fails to parse the following:
#define bitfield  struct __attribute__ ((packed))

struct MyStuct
{
    bitfield
    {
        unsigned flag1 : 1;
        unsigned flag2 : 1;
        unsigned flag3 : 1;
        unsigned flag4 : 1;
        unsigned flag5 : 1;
    };
};

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 09 2020 :  3:57:54 PM  Show Profile  Reply with Quote
What problems are you seeing with this?

e.g. Do you have missing items in a member listbox? Or in Find References Results window? Or a refactoring command is broken?
Go to Top of Page

codex
New Member

USA
2 Posts

Posted - May 09 2020 :  4:57:35 PM  Show Profile  Reply with Quote
In the code editor, when using the struct, the members in the bitfield struct (flag1, flag2, etc.) are underlined with the red squiggle, and reported as "Unrecognized symbol." on the hover-over tootip. Also, they do not appear in the member listbox, but "bitfield" does appear in the member listbox instead.

Edited by - codex on May 09 2020 4:58:48 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - May 10 2020 :  12:15:09 AM  Show Profile  Reply with Quote
The red underlines come from intellisense, and you can control them via:

Tools -> Text Editor -> C/C++ -> Advanced -> Intellisense -> Disable Squiggles

It seems that __attribute ((packed)) is a not part of standard C++. The code doesn't compile for me using VS2019, and Intellisense doesn't understand the code either.

Unfortunately, I wasn't able to find a workaround to make it work with Visual Assist, either.
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