Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAOutline confused by #ifdef around if

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
thorsten.bschorr Posted - Feb 11 2020 : 02:35:22 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 11 2020 : 08:08:27 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000