SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: rgloden on February 01, 2015, 09:32:35 pm

Title: C++ confusing "Symbol Not Found"
Post by: rgloden 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
Title: Re: C++ confusing "Symbol Not Found"
Post by: Clark 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.
Title: Re: C++ confusing "Symbol Not Found"
Post by: rgloden 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.   :)
Title: Re: C++ confusing "Symbol Not Found"
Post by: Dennis 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.
Title: Re: C++ confusing "Symbol Not Found"
Post by: gdayton on July 02, 2015, 10:01:09 pm
Sorry to say that the bug is still present in 19.0.2.5.