------- 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