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
 VAOutline confused by #ifdef around if
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thorsten.bschorr
Starting Member

1 Posts

Posted - Feb 11 2020 :  02:35:22 AM  Show Profile  Reply with Quote
Consider the following code fragment:

int funcA()
{
#ifdef A
  if(1)
#else
  if(2)
#endif
  {
    doSth();
  }
}

int funcB()
{
}


VA Outline view then prints funcB() as a child of funcA() (and not as a sibling):



Note: the same happens when using for-statements instead of if.

feline
Whole Tomato Software

United Kingdom
16896 Posts

Posted - Feb 11 2020 :  08:08:27 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=49406

in this case, the problem is due to the #else line, so if you change the first function to become:

int funcA()
{
#ifdef A
  if(1)
#endif
#ifndef A
  if(2)
#endif
  {
    doSth();
  }
}


then this fixes the problem.

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:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000