Author Topic: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)  (Read 812 times)

mklein

  • Community Member
  • Posts: 84
  • Hero Points: 2
C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« on: August 11, 2016, 05:14:01 pm »
I'm having troubles with context tagging for GCC 5.4 in Ubuntu LTS. I haven't tried everything, but shared_ptr indirection seems to not work. Is this expected to work or should I come up with a repro?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2256
  • Hero Points: 283
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #1 on: August 11, 2016, 05:56:49 pm »
I'll try to reproduce the problem.  I wouldn't be surprised if it all traces down to additional preprocessing.  Every release of GCC adds more preprocessing garbage to the libs.  Every release of Boost adds more preprocessing garbage too.  Pretty soon, there won't be any C++ left anymore.

mklein

  • Community Member
  • Posts: 84
  • Hero Points: 2
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #2 on: August 12, 2016, 03:27:34 am »
FWIW, unique_ptr works fine. Just shared_ptr is having issues so yeah I'm sure it's some change in that code in particular.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2256
  • Hero Points: 283
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #3 on: August 12, 2016, 06:13:00 pm »
I could not reproduce this with either v21 beta2 or beta3, so there must be something more complicated going on in your case?  Are you using the Boost shared_ptr or std::shared_ptr?

The following test case works perfectly with a default configuration on Ubuntu 16.

Code: [Select]
void sharedptrtest()
{
   shared_ptr<tms> pt;
   pt-> ;  // shows tms_*
}

mklein

  • Community Member
  • Posts: 84
  • Hero Points: 2
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #4 on: August 13, 2016, 03:41:06 pm »
Yeah you are right the trivial case works. OK I will try to come up with a better repro.

mklein

  • Community Member
  • Posts: 84
  • Hero Points: 2
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #5 on: August 13, 2016, 08:14:40 pm »
I don't think the issue has anything to do with GCC 5. I realized that I had 2 projects in my workspace with the same namespace name in them. This is the same workspace layout that I had in v20, so something is different. When I removed one of the projects everything in that namespace works fine.

However, I can still reproduce issues in my single project where I have something like this:

namespace Foo {

}

namespace Bar {
namespace Foo {
}
}

When I type "Foo::", autocomplete and indexing are only giving me the things in Bar::Foo, vs. the things in Foo.

I'm having trouble coming up with a self contained repro. I will keep working on it. But maybe this will help if there have been any changes in this area in v21.

mklein

  • Community Member
  • Posts: 84
  • Hero Points: 2
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #6 on: August 13, 2016, 08:38:38 pm »
Attached is a self contained repro, see the comment in main.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2256
  • Hero Points: 283
Re: C++ context tagging for Ubuntu 16 LTS (GCC 5.4)
« Reply #7 on: August 24, 2016, 06:47:36 pm »
Fixed for beta4.