Community
Participate
Working Groups
Build Identifier: 20110615-0604 I'm working with a library that has lots of examples of the diamond pattern of multiple inheritance. I've noticed that with CDT 8.0 (indigo), it does not recognize that a pure virtual method has been implemented in one of the parents. I've found I can work around it with a "using" directive, but this pattern is pervasive in this library and I'm going to have to do this a lot if I go with the "using" approach. I'll attach a small example in a minute. Reproducible: Always Steps to Reproduce: 1. Multiply inherit from a common class that declares a pure virtual method. 2. One intermediate superclass implements the method, the other doesn't. 3. Instantiate the child class. 4. See a (bogus) error marker.
Created attachment 199368 [details] Shows how multiple inheritance and virtual methods generate bogus error marker
i wonder why this problem is not classified higher. this is an obvious bug and it happens in daily use.. (here too)
Still not fixed 1.5 years after being reported... Eclipse Juno, CDT 8.1.2.201302132326
I'm in a similar situation as Chris, we have third party libs using lots of diamond inheritance. For me, this is actually the one major annoyance with the CDT right now.
*** Bug 364236 has been marked as a duplicate of this bug. ***
*** cdt git genie on behalf of Nathan Ridge *** Bug 351612 - Pure virtual implementation not recognized if multiply inherited Change-Id: I1e9141fbb5cc72bb7b59b77d6faf958726094e5f Signed-off-by: Nathan Ridge <zeratul976@xxxxxxxxxxx> Reviewed-on: <a href="https://git.eclipse.org/r/14906">https://git.eclipse.org/r/14906</a> Reviewed-by: Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> IP-Clean: Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> Tested-by: Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=266e36403abcedec29241f6f38eab7616e6820d3
Fixed in 8.2.1 and master.
Verified in 8.2.1 RC1 (EPP 20130821-2252).
Are you really sure the problem is fixed for all cases of multiple inheritance? We still have the problem with C/C++ Development Tools 8.2.1.201309180223. In our case (HttpClientTransportImpl and HttpServerTransportImpl in http://svn.clazzes.org/svn/fancylibs/trunk/fancylibs/src/fancysock/fancysockhttptransport.cpp), we don't have a single inheritance diamond providing only 2 paths to the pure virtual definition, but a pile of diamonds with probably 4 or 6 paths. This might not be pretty, but we believe in implementation hiding. Is there some hidden cache not totally rebuilt with C++Index/Rebuild, eventually keeping alive false-negative analysations from former CDT versions?
(In reply to Christoph Lechleitner from comment #9) > Are you really sure the problem is fixed for all cases of multiple > inheritance? I can reproduce your issue with both CDT 8.2.1 and the master branch. I created bug 419938 to track it and added sample code.
Thanks a lot!
I can confirm that the resolution of the follow-up issue #419938 (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=419938#c2) fixes my variant of the problem. Tested in Eclipse 4.4M4 with CDT's nighty build. Thanks again.
*** Bug 374422 has been marked as a duplicate of this bug. ***