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
 VA outline can't handle #if 1 on if-statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

tiancovici
Junior Member

19 Posts

Posted - Sep 04 2019 :  07:59:16 AM  Show Profile  Reply with Quote
Problem: When using #if-else-endif on the if(<condition>) portion, VA outline starts assuming all following functions are nested inside.

Expected behavior: All following function should be indented on same level

Reproduce Sample Code:




void func1(void)
{

}
void func2(void)
{
int x = 0;
#if 1
if(x == 0)
#else
if( x == 1)
#endif
{


}
}
void func3(void)
{

}
void func4(void)
{

}


System notes
Support ends 2019.12.01
VA_X.dll file version 10.9.2341.2 built 2019.08.05
DevEnv.exe version 14.0.25420.1 Professional
msenv.dll version 14.0.25431.1
Comctl32.dll version 6.10.17763.719
Windows 10 10.0 1809 Build 17763.720
8 processors (x86-64, WOW64)
Language info: 1252, 0x409

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Sep 04 2019 :  7:31:01 PM  Show Profile  Reply with Quote
Thank you for the clear description and the sample code. I believe that this is

case=59101
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Sep 06 2019 :  08:06:07 AM  Show Profile  Reply with Quote
As a temporary work around, if you change "#if 1" into "#if 0", reversing the if / else blocks, then VA Outline shows this code correctly. Hopefully helpful if you don't run into this to often.

zen is the art of being at one with the two'ness
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