View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025076 | Community | OCCT:Coding | public | 2014-07-13 00:17 | 2016-04-20 15:50 |
Reporter | Epy | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Linux 32-bit | OS | Lubuntu | ||
Product Version | 6.7.1 | ||||
Target Version | 7.0.0 | Fixed in Version | 7.0.0 | ||
Summary | 0025076: Hidden overloaded virtual functions | ||||
Description | 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. | ||||
Steps To Reproduce | Compile with CLang | ||||
Tags | No tags attached. | ||||
Test case number | |||||
related to | 0025411 | closed | bugmaster | Open CASCADE | BVH package - eliminate warning about hidden overloaded method ::Box |
parent of | 0027065 | closed | Open CASCADE | BRepOffsetAPI_MakePipe misses definition of virtual method Generated() | |
parent of | 0027047 | closed | Open CASCADE | STEP -- eliminate useless polymorhic methods Init() | |
parent of | 0027058 | closed | Open CASCADE | AIS_ColorScale defines methods SetColor and SetWidth hiding inherited methods | |
parent of | 0027066 | closed | bugmaster | Open CASCADE | BRepFeat_MakeCylindricalHole::Perform() hides overloaded virtual function |
related to | 0027067 | closed | Open CASCADE | Avoid use of virtual methods for implementation of destructors in legacy classes | |
related to | 0026990 | closed | Open CASCADE | Compiler warnings in LDOM_OSStream.hxx |
|
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. |
|
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 |
|
Some cases are separated into children and related issues; fix for remaining ones is pushed to CR25076. Please review |
|
Please test the patch. |
|
These warnings are still present in the 7.0.0 beta source tarball. |
|
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? |
|
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). |
|
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. |
|
I should add that these were the only 3 warnings I got when compiling with -Wall on Clang, which is fantastic. |
|
Yes, this remaining warning is subject of 0027065; it is separated because that particular case needs to be investigated more carefully |
|
Branch CR25076 has been deleted by kgv. SHA-1: 533d1a62fdfefec5352c8a56ef2c66884ae2ca09 |
occt: master 201c2208 2015-12-29 04:07:17
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 |
Affected Issues 0025076 |
|
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 |
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 |
|
Note Added: 0030106 | |
2014-09-11 19:15 |
|
Target Version | => 7.0.0 |
2014-11-12 08:04 | kgv | Relationship added | related to 0025411 |
2016-01-08 19:11 |
|
Relationship added | parent of 0027065 |
2016-01-08 19:11 |
|
Assigned To | kgv => abv |
2016-01-08 19:11 |
|
Status | new => assigned |
2016-01-08 19:12 |
|
Relationship added | parent of 0027047 |
2016-01-08 19:12 |
|
Relationship added | parent of 0027058 |
2016-01-08 19:46 |
|
Relationship added | parent of 0027066 |
2016-01-08 19:55 |
|
Relationship added | related to 0027067 |
2016-01-08 20:09 | git | Note Added: 0049732 | |
2016-01-08 20:11 |
|
Note Added: 0049733 | |
2016-01-08 20:11 |
|
Assigned To | abv => kgv |
2016-01-08 20:11 |
|
Status | assigned => resolved |
2016-01-08 20:11 |
|
Steps to Reproduce Updated | |
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 |
|
Relationship added | related to 0026990 |
2016-01-15 16:57 |
|
Changeset attached | => occt master 201c2208 |
2016-01-15 16:57 |
|
Assigned To | bugmaster => abv |
2016-01-15 16:57 |
|
Status | reviewed => verified |
2016-01-15 16:57 |
|
Resolution | open => fixed |
2016-01-20 06:38 | Epy | Note Added: 0049955 | |
2016-01-20 09:30 |
|
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 |
|
Note Added: 0050091 | |
2016-04-17 13:46 | git | Note Added: 0052937 | |
2016-04-20 15:43 |
|
Fixed in Version | => 7.0.0 |
2016-04-20 15:50 |
|
Status | verified => closed |