Author Topic: C++ confusing "Symbol Not Found"  (Read 1715 times)

rgloden

  • Senior Community Member
  • Posts: 167
  • Hero Points: 5
C++ confusing "Symbol Not Found"
« on: February 01, 2015, 09:32:35 pm »
Found a situation where SE C++ parser is getting confused.

The references to cats and dogs in the following code are color coded as "Symbol Not Found".  But when I mouse over cats or dogs, SE knows the associated type and comment.  And CNTRL-period takes me to the definition

(Below is representative code -- don't have SE on my email machine)

void test()
{
   int x:
   int y;

   struct AAA
   {
      int count;
      int oranges;
      int grapes;
   }
   struct BBB
   {
      int count;
      int cats;      // fury creatures
      int dogs;     // loveable creatures
   }

   if (x = 0);
   {
      AAA * ref;
      y = ref->count;
      y = ref->oranges;
      y = ref->grapes;
   }
   else if (x = 1)
   {
      BBB * ref;
      y = ref->count;
      y = ref->cats;
      y = ref->dogs;
   }
}


SlickEdit 2014 (V19.0.0.14 64-bit)
Windows 7 64-bit

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4962
  • Hero Points: 409
Re: C++ confusing "Symbol Not Found"
« Reply #1 on: February 01, 2015, 10:07:31 pm »
I haven't tried anything but I noticed that both struct definitions are missing a semicolon after the close brace. I wouldn't think the source would compile.

rgloden

  • Senior Community Member
  • Posts: 167
  • Hero Points: 5
Re: C++ confusing "Symbol Not Found"
« Reply #2 on: February 01, 2015, 10:49:29 pm »
I had to make up this code snippet since my email PC isn't on the same network as my development/SE PC.  There are other obvious shortcuts like the pointer not being assigned.  I was hoping to get just enough syntax correct to demonstrate the problem.  My real code does compile ... I promise.   :)

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2831
  • Hero Points: 429
Re: C++ confusing "Symbol Not Found"
« Reply #3 on: February 02, 2015, 04:42:54 pm »
The bug is specific to the symbol coloring engine.  It traces to having two variables names "ref" in adjacent scopes that evaluate to different types.  There will be a fix in the next revision of the 19.0.1 hot fix.  There will also be a more comprehensive fix in the next release of SlickEdit.
« Last Edit: February 02, 2015, 11:11:22 pm by Dennis »

gdayton

  • Junior Community Member
  • Posts: 6
  • Hero Points: 0
Re: C++ confusing "Symbol Not Found"
« Reply #4 on: July 02, 2015, 10:01:09 pm »
Sorry to say that the bug is still present in 19.0.2.5.