From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7928 invoked by alias); 29 Aug 2005 20:23:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7867 invoked by uid 48); 29 Aug 2005 20:23:46 -0000 Date: Mon, 29 Aug 2005 20:27:00 -0000 Message-ID: <20050829202346.7866.qmail@sourceware.org> From: "mmarcus at emarcus dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050829194742.23628.mmarcus@emarcus.org> References: <20050829194742.23628.mmarcus@emarcus.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/23628] Typeinfo comparison code easily breaks shared libs X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03365.txt.bz2 List-Id: ------- Additional Comments From mmarcus at emarcus dot org 2005-08-29 20:23 ------- Actually, I'll just paste the darwin test case here. On this platform, libstdc++ is a sharedlib. The following code: ### #include #include #include int main (int argc, char * const argv[]) { std::vector v; try { v.at(1); } catch(const std::out_of_range& e) { std::cout << "Correct behavior: out of range caught, what==: " << e.what() << "\n"; throw; } catch(...) { std::cout << "Oops, apparent problem with type identity across a DLL boundary\n"; throw; } return 0; } ### Output is the "Oops case" when built without explictly setting -fvisibility=default or -fvisibility-inlines-hidden for the "hosting" exectuable. -- What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Ever Confirmed| |1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23628