To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=107473 Issue #|107473 Summary|[nonproduct] sal: osl::DebugBase uses static_cast in i |nvalid way Component|porting Version|DEV300m66 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|PATCH Priority|P3 Subcomponent|code Assigned to|sb Reported by|dtardon
------- Additional comments from [email protected] Sun Dec 6 13:43:39 +0000 2009 ------- Nonproduct build fails in testtools with the following message: In file included from /home/dtardon/work/upstream/openoffice.org/nonproduct/testtools/source/bridgetest/cppobj.cxx:38: /home/dtardon/work/upstream/openoffice.org/nonproduct/solver/300/unxlngx6/inc/osl/diagnose.hxx: In constructor 'osl::DebugBase<InheritingClassT>::DebugBase() [with InheritingClassT = bridge_object::Test_Impl]': /home/dtardon/work/upstream/openoffice.org/nonproduct/testtools/source/bridgetest/cppobj.cxx:162: instantiated from here /home/dtardon/work/upstream/openoffice.org/nonproduct/solver/300/unxlngx6/inc/osl/diagnose.hxx:194: error: 'osl::DebugBase<bridge_object::Test_Impl>' is an inaccessible base of 'bridge_object::Test_Impl' The problem is that bridge_object::Test_Impl inherits protectedly from osl::DebugBase, which makes osl::DebugBase an inaccessible base class of it, therefore static_cast cannot be used (From ISO C++ Standard, 5.2.9, par. 2: "An expression e can be explicitly converted to a type T using static_cast of the form static_cast<T>(e) if the declaration "T t(e);" is well formed for some invented temporary variable t (8.5)."). Because non-public derivation of osl::DebugBase is plainly the indended way of using it, the implementation must be changed to avoid the problematic static_casts. In the current implementation a pointer is used just for representation of its address and is never dereferenced, therefore I think the best way is to use plain void const* in the osl::DebugBase interface, like the following patch does. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
