From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27961 invoked by alias); 30 Aug 2005 13:10:32 -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 27876 invoked by uid 48); 30 Aug 2005 13:10:21 -0000 Date: Tue, 30 Aug 2005 13:17:00 -0000 Message-ID: <20050830131021.27875.qmail@sourceware.org> From: "ghost at cs dot msu dot su" 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/msg03445.txt.bz2 List-Id: ------- Additional Comments From ghost at cs dot msu dot su 2005-08-30 13:10 ------- To clarify what Marcus said, I've made a small example: http://zigzag.cs.msu.su/~ghost/rtti-4.0 The third party library 'libhelper.so' is built with default visibility. I want my own library 'libhelper2.so' to be built with hidden visibility. However, my library contains this: try { foo(); } catch(my_exception& e) { Both 'foo' and 'my_exception' are defined in libhelper.so -- third party library. So, if I build my library with hidden visibility, 'catch' no longer works. I have two solutions: 1. Add push/pops in other library headers, which is very inconvenient. 2. Create wrapper headers and add push/pops there, which is very inconvenient. And if I forget just a single header (which was probably added in the last version of third party library), I'll get hard to diagnose bug. Usability cost is indeed high. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23628