Community
Participate
Working Groups
Build Identifier: 20110615-0604 Omniorb (CORBA implemplementation) generates (correct) code that is considered incorrect by code analysis. I have stripped down the code to the basic problem, but I'm afraid it still needs a bit of explanation. We have class CItf that defines a pure virtual function "tbi()". The implementation of the interface (includes more methods in omniorb) is split and provided by two classes CImplPart1 and CImplPart2 (of course I have omitted all the methods that are implemented by those classes in omniorb; the point in omniorb is that CImplPart1 is common to all eventually derived implementations, while CImplPart2 varies, i.e. may be replaced by different classes for supplying the particular methods). Eventually the "fixed" part CImplPart1 and the "varying" part (represented here by CImplPart2) are combined again in a class "CCombinedImpl" that can be used to instanciate objects. CImplPart2 contributes the implementation of the pure virtual "tbi()", but it does this using a private definition of the method. This is a bit strange but formally OK. However, code analysis does not accept this implementation as satisfying the requirement for an implementation of the pure virtual method "tbi()" in CItf and puts an error marker at the declaration of an object of type CCombinedImpl in Test.cpp. The code compiles nevertheless without even a warning. I've added "invokeTbi" simply to show that it also works as expected. Reproducible: Always Steps to Reproduce: 1. Unpack 2. Look at error marker
Created attachment 207277 [details] The code that reproduces the problem
seems to be the same bug as https://bugs.eclipse.org/bugs/show_bug.cgi?id=351612
*** This bug has been marked as a duplicate of bug 351612 ***