MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025076Community[OCCT] OCCT:Codingpublic2014-07-13 00:172016-04-20 15:50
ReporterEpy 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformLinux 32-bitOSLubuntuOS Version14.04
Product Version[OCCT] 6.7.1 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0025076: Hidden overloaded virtual functions
DescriptionWhen 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.
Steps To ReproduceCompile with CLang
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0025411closedbugmaster Open CASCADE BVH package - eliminate warning about hidden overloaded method ::Box 
parent of 0027065closedabv Open CASCADE BRepOffsetAPI_MakePipe misses definition of virtual method Generated() 
parent of 0027047closedabv Open CASCADE STEP -- eliminate useless polymorhic methods Init() 
parent of 0027058closedabv Open CASCADE AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods 
parent of 0027066closedbugmaster Open CASCADE BRepFeat_MakeCylindricalHole::Perform() hides overloaded virtual function 
related to 0027067closedabv Open CASCADE Avoid use of virtual methods for implementation of destructors in legacy classes 
related to 0026990closedabv Open CASCADE Compiler warnings in LDOM_OSStream.hxx 

-  Notes
(0030106)
abv (manager)
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 (administrator)
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 (manager)
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 (developer)
2016-01-08 20:43

Please test the patch.
(0049955)
Epy (developer)
2016-01-20 06:38

These warnings are still present in the 7.0.0 beta source tarball.
(0049957)
abv (manager)
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 (developer)
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 (developer)
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 (developer)
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 (manager)
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 (administrator)
2016-04-17 13:46

Branch CR25076 has been deleted by kgv.

SHA-1: 533d1a62fdfefec5352c8a56ef2c66884ae2ca09

- Related Changesets
occt: master 201c2208
Timestamp: 2015-12-29 04:07:17
Author: abv
Committer: abv
Details ] Diff ]
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
mod - src/AIS/AIS_AngleDimension.hxx Diff ] File ]
mod - src/AIS/AIS_DiameterDimension.hxx Diff ] File ]
mod - src/AIS/AIS_Dimension.hxx Diff ] File ]
mod - src/AIS/AIS_RadiusDimension.hxx Diff ] File ]
mod - src/AIS/AIS_Shape.hxx Diff ] File ]
mod - src/BRepExtrema/BRepExtrema_TriangleSet.hxx Diff ] File ]
mod - src/BRepFill/BRepFill_PipeShell.cxx Diff ] File ]
mod - src/BRepFill/BRepFill_PipeShell.hxx Diff ] File ]
mod - src/BRepOffsetAPI/BRepOffsetAPI_MakePipeShell.cxx Diff ] File ]
mod - src/Geom2dInt/Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx Diff ] File ]
mod - src/HLRBRep/HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx Diff ] File ]
mod - src/PCDM/PCDM_RetrievalDriver.cxx Diff ] File ]
mod - src/PCDM/PCDM_RetrievalDriver.hxx Diff ] File ]
mod - src/Select3D/Select3D_BVHPrimitiveContent.hxx Diff ] File ]
mod - src/SelectMgr/SelectMgr_SelectableObjectSet.hxx Diff ] File ]
mod - src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx Diff ] File ]
mod - src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.cxx Diff ] File ]
mod - src/StdLDrivers/StdLDrivers_DocumentRetrievalDriver.hxx Diff ] File ]
mod - src/XCAFDoc/XCAFDoc_ShapeTool.cxx Diff ] File ]
mod - src/XCAFDoc/XCAFDoc_ShapeTool.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-07-13 00:17 Epy New Issue
2014-07-13 00:17 Epy Assigned To => kgv
2014-07-14 09:46 abv Note Added: 0030106
2014-09-11 19:15 abv Target Version => 7.0.0
2014-11-12 08:04 kgv Relationship added related to 0025411
2016-01-08 19:11 abv Relationship added parent of 0027065
2016-01-08 19:11 abv Assigned To kgv => abv
2016-01-08 19:11 abv Status new => assigned
2016-01-08 19:12 abv Relationship added parent of 0027047
2016-01-08 19:12 abv Relationship added parent of 0027058
2016-01-08 19:46 abv Relationship added parent of 0027066
2016-01-08 19:55 abv Relationship added related to 0027067
2016-01-08 20:09 git Note Added: 0049732
2016-01-08 20:11 abv Note Added: 0049733
2016-01-08 20:11 abv Assigned To abv => kgv
2016-01-08 20:11 abv Status assigned => resolved
2016-01-08 20:11 abv Steps to Reproduce Updated View Revisions
2016-01-08 20:43 kgv Note Added: 0049739
2016-01-08 20:43 kgv Assigned To kgv => bugmaster
2016-01-08 20:43 kgv Status resolved => reviewed
2016-01-09 14:41 abv Relationship added related to 0026990
2016-01-15 16:57 abv Changeset attached => occt master 201c2208
2016-01-15 16:57 abv Assigned To bugmaster => abv
2016-01-15 16:57 abv Status reviewed => verified
2016-01-15 16:57 abv Resolution open => fixed
2016-01-20 06:38 Epy Note Added: 0049955
2016-01-20 09:30 abv Note Added: 0049957
2016-01-20 09:40 Epy Note Added: 0049958
2016-01-22 22:59 Epy Note Added: 0050088
2016-01-22 23:00 Epy Note Added: 0050089
2016-01-23 09:19 abv Note Added: 0050091
2016-04-17 13:46 git Note Added: 0052937
2016-04-20 15:43 user533 Fixed in Version => 7.0.0
2016-04-20 15:50 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker