MantisBT - Community
View Issue Details
0025076Community[OCCT] OCCT:Codingpublic2014-07-13 00:172016-04-20 15:50
Epy 
abv 
normalminor 
closedfixed 
Linux 32-bitLubuntu14.04
[OCCT] 6.7.1 
[OCCT] 7.0.0[OCCT] 7.0.0 
0025076: Hidden overloaded virtual functions
When compiling with GCC or Clang with (-Woverloaded-virtual), there are a lot of warnings, for example:

In file included from test_2.cxx:16:
/usr/include/oce/BRepOffsetAPI_MakePipeShell.hxx:156:28: warning:
      'BRepOffsetAPI_MakePipeShell::Delete' hides overloaded virtual function
      [-Woverloaded-virtual]
  Standard_EXPORT void Delete(const TopoDS_Shape& Profile) ;
                           ^
/usr/include/oce/BRepBuilderAPI_MakeShape.hxx:47:35: note: hidden overloaded
      virtual function 'BRepBuilderAPI_MakeShape::Delete' declared here:
      different number of parameters (0 vs 1)
  Standard_EXPORT virtual void Delete() ;
                                  ^
1 warning generated.

Are these intentional? If so, then this can be closed.
Compile with CLang
No tags attached.
related to 0025411closed bugmaster Open CASCADE BVH package - eliminate warning about hidden overloaded method ::Box 
parent of 0027065closed abv Open CASCADE BRepOffsetAPI_MakePipe misses definition of virtual method Generated() 
parent of 0027047closed abv Open CASCADE STEP -- eliminate useless polymorhic methods Init() 
parent of 0027058closed abv Open CASCADE AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods 
parent of 0027066closed bugmaster Open CASCADE BRepFeat_MakeCylindricalHole::Perform() hides overloaded virtual function 
related to 0027067closed abv Open CASCADE Avoid use of virtual methods for implementation of destructors in legacy classes 
related to 0026990closed abv Open CASCADE Compiler warnings in LDOM_OSStream.hxx 
Issue History
2014-07-13 00:17EpyNew Issue
2014-07-13 00:17EpyAssigned To => kgv
2014-07-14 09:46abvNote Added: 0030106
2014-09-11 19:15abvTarget Version => 7.0.0
2014-11-12 08:04kgvRelationship addedrelated to 0025411
2016-01-08 19:11abvRelationship addedparent of 0027065
2016-01-08 19:11abvAssigned Tokgv => abv
2016-01-08 19:11abvStatusnew => assigned
2016-01-08 19:12abvRelationship addedparent of 0027047
2016-01-08 19:12abvRelationship addedparent of 0027058
2016-01-08 19:46abvRelationship addedparent of 0027066
2016-01-08 19:55abvRelationship addedrelated to 0027067
2016-01-08 20:09gitNote Added: 0049732
2016-01-08 20:11abvNote Added: 0049733
2016-01-08 20:11abvAssigned Toabv => kgv
2016-01-08 20:11abvStatusassigned => resolved
2016-01-08 20:11abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12723#r12723
2016-01-08 20:43kgvNote Added: 0049739
2016-01-08 20:43kgvAssigned Tokgv => bugmaster
2016-01-08 20:43kgvStatusresolved => reviewed
2016-01-09 14:41abvRelationship addedrelated to 0026990
2016-01-15 16:57abvChangeset attached => occt master 201c2208
2016-01-15 16:57abvAssigned Tobugmaster => abv
2016-01-15 16:57abvStatusreviewed => verified
2016-01-15 16:57abvResolutionopen => fixed
2016-01-20 06:38EpyNote Added: 0049955
2016-01-20 09:30abvNote Added: 0049957
2016-01-20 09:40EpyNote Added: 0049958
2016-01-22 22:59EpyNote Added: 0050088
2016-01-22 23:00EpyNote Added: 0050089
2016-01-23 09:19abvNote Added: 0050091
2016-04-17 13:46gitNote Added: 0052937
2016-04-20 15:43aivFixed in Version => 7.0.0
2016-04-20 15:50aivStatusverified => closed

Notes
(0030106)
abv   
2014-07-14 09:46   
Most overloads are intentional, but it may happen that same occurrences are wrong, to be checked. In any case, something should be done to silence the warnings.
(0049732)
git   
2016-01-08 20:09   
Branch CR25076 has been created by abv.

SHA-1: 533d1a62fdfefec5352c8a56ef2c66884ae2ca09


Detailed log of new commits:

Author: abv
Date: Tue Dec 29 07:07:17 2015 +0300

    0025076: Hidden overloaded virtual functions
    
    Implementation of virtual functions is made more consistent in places where warning was issued:
    
    - Missing implementation of virtual method Closed() added in classes inheriting Intf_Polygon2d
    - Empty implementation of virtual method Read() accepting stream is moved from PCDM_RetrievalDriver to StdLDrivers_DocumentRetrievalDriver
    - Method BRepFill::Delete() is renamed to DeleteProfile() to avoid confusion with method Delete() inherited from MMgt_TShared
    - Virtual method AIS_Dimenaion::ComputePlane() is removed from base class; each dimension defines and uses its own method with the same name (but different arguments)
    - Inherited virtual method Dump() with single argument in class XCAFDoc_ShapeTool is now defined as short-cut to own method Dump(), also calling parent's one
    - Inherited virtual method BoundingBox(void) is made visible in AIS_Shape
    - Inherited virtual method Box(void) is made visible in classes inheriting BVH_PrimitiveSet
(0049733)
abv   
2016-01-08 20:11   
Some cases are separated into children and related issues; fix for remaining ones is pushed to CR25076. Please review
(0049739)
kgv   
2016-01-08 20:43   
Please test the patch.
(0049955)
Epy   
2016-01-20 06:38   
These warnings are still present in the 7.0.0 beta source tarball.
(0049957)
abv   
2016-01-20 09:30   
Hello Jacob, yes these warnings are present in 7.0.0.beta, but should be fixed (except one, see ) in master, integrated on January 15th. Can you check this on your side?
(0049958)
Epy   
2016-01-20 09:40   
Yes, I can check this once I have git access. I was unable to find the SSH keys section in the "My Account" section on dev.opencascade.org (I posted to the forum for help with this).
(0050088)
Epy   
2016-01-22 22:59   
I get the following on master as of an hour ago:

In file included from /home/jake/occt/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.cxx:19:
In file included from /home/jake/occt/build/inc/BRepOffsetAPI_MakePipe.hxx:1:
/home/jake/occt/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx:82:32: warning: 'BRepOffsetAPI_MakePipe::Generated' hides overloaded virtual function [-Woverloaded-virtual]
  Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
                               ^
/home/jake/occt/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx:54:55: note: hidden overloaded virtual function 'BRepBuilderAPI_MakeShape::Generated' declared here: different number of parameters (1 vs 2)
  Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
                                                      ^
1 warning generated.
In file included from /home/jake/occt/src/BRepTest/BRepTest_SweepCommands.cxx:27:
In file included from /home/jake/occt/build/inc/BRepOffsetAPI_MakePipe.hxx:1:
/home/jake/occt/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx:82:32: warning: 'BRepOffsetAPI_MakePipe::Generated' hides overloaded virtual function [-Woverloaded-virtual]
  Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
                               ^
/home/jake/occt/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx:54:55: note: hidden overloaded virtual function 'BRepBuilderAPI_MakeShape::Generated' declared here: different number of parameters (1 vs 2)
  Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
                                                      ^
1 warning generated.
In file included from /home/jake/occt/src/QABugs/QABugs_19.cxx:52:
In file included from /home/jake/occt/build/inc/BRepOffsetAPI_MakePipe.hxx:1:
/home/jake/occt/src/BRepOffsetAPI/BRepOffsetAPI_MakePipe.hxx:82:32: warning: 'BRepOffsetAPI_MakePipe::Generated' hides overloaded virtual function [-Woverloaded-virtual]
  Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
                               ^
/home/jake/occt/src/BRepBuilderAPI/BRepBuilderAPI_MakeShape.hxx:54:55: note: hidden overloaded virtual function 'BRepBuilderAPI_MakeShape::Generated' declared here: different number of parameters (1 vs 2)
  Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S);
                                                      ^
1 warning generated.
(0050089)
Epy   
2016-01-22 23:00   
I should add that these were the only 3 warnings I got when compiling with -Wall on Clang, which is fantastic.
(0050091)
abv   
2016-01-23 09:19   
Yes, this remaining warning is subject of 0027065; it is separated because that particular case needs to be investigated more carefully
(0052937)
git   
2016-04-17 13:46   
Branch CR25076 has been deleted by kgv.

SHA-1: 533d1a62fdfefec5352c8a56ef2c66884ae2ca09