From: Vadim Zeitlin Date: Tue, 9 Jan 2007 14:01:08 +0000 (+0000) Subject: more about virtual functions access specifier changing X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/63dd461bc8861f657bbc5d76a97a18d2e77c2da2 more about virtual functions access specifier changing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/tech/tn0020.txt b/docs/tech/tn0020.txt index d351b4e349..8bcbf2c3a7 100644 --- a/docs/tech/tn0020.txt +++ b/docs/tech/tn0020.txt @@ -46,8 +46,14 @@ The changes that are NOT binary compatible: even a default one) - Changing the order of the virtual functions in a class ["switching" them, etc.] -- Changing access privileges to a function (protected to private etc.) -[unlike KDE we need to support windows so this is not allowed] +- Changing access privileges of a function: some compilers (among which MSVC) + use the function access specifier in its mangled name. Moreover, while + changing a private function to public should be compatible (as the old + symbol can't be referenced from outside the library anyhow), changing a + virtual private function to public is NOT compatible because the old symbol + is referenced by the virtual tables in the executable code and so an old + program compiled with MSVC wouldn't start up with a new DLL even if it + doesn't use the affected symbol at all! - Adding a member variable - Changing the order of non-static member variables