Hi Robert, That is surprising and unfortunate -- in this instance VC++ is actually correct. If you know which compilers gave contradictory warnings I might be able to see if that has now been corrected. In any event, it seems better to have correct code give erroneous warnings than incorrect code that gives correct warnings. I think there 2+ classes which aren't properly initializing the
virtual bases, at least on compilers that handle virtual bases
correctly. So there may be actual bugs, not just warnings. I am
willing to pursue this if you would like me to. --
Stuart G Mentzer Objexx Engineering Office 1.781.455.1150 x11 Mobile 1.781.708.3872 On 6/30/2016 4:29 AM, Robert Osfield
wrote:
Hi Stuart, This warning is a bit of pain. Fix this warning and you generate a warning with other compilers depending upon which compiler and warning options enabled. We had a discussion and attempted to fix some of these warnings in the last dev release cycle.Robert. On 30 June 2016 at 06:08, Stuart Mentzer <stuart_ment...@objexx.com> wrote:Hello, Visual C++ 2015 finds a problem (in current master) with the initialization of virtual base classes in the constructors of the hierarchies including Object, Callback, NodeCallback, GUIEventHandler, EventHandler, CameraManipulator, StandardManipulator, and AnimationManagerBase. Constructors are attempting to initialize virtual bases Object and Callback from classes that are not the most-derived, concrete class so those initializations are being ignored. It doesn't help (or look right) that multiple levels in the hierarchy attempt (and fail) to initialize these virtual bases. An example of the reported warnings is: C:\Projects\OSG\OpenSceneGraph\src\osgGA\CameraManipulator.cpp(24): warning C4589: Constructor of abstract class 'osgGA::CameraManipulator' ignores initializer for virtual base class 'osg::Object' C:\Projects\OSG\OpenSceneGraph\src\osgGA\CameraManipulator.cpp(24): note: virtual base classes are only initialized by the most-derived type C:\Projects\OSG\OpenSceneGraph\src\osgGA\CameraManipulator.cpp(25): warning C4589: Constructor of abstract class 'osgGA::CameraManipulator' ignores initializer for virtual base class 'osg::Callback' C:\Projects\OSG\OpenSceneGraph\src\osgGA\CameraManipulator.cpp(25): note: virtual base classes are only initialized by the most-derived type In some cases I see the most-derived classes also do the (correct) virtual base initialization but it looks like at least these 2 are missing it: BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop) TimelineAnimationManager::TimelineAnimationManager(const TimelineAnimationManager& nc,const osg::CopyOp& co) I don't know enough of the internals to say if this could be causing problems in practice but it would be good to fix this usage. I'm willing to take a shot at it if that would be helpful. Stuart _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org |
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org