[PATCH] <stdexcept> visibility
Benjamin Kosnik
bkoz@redhat.com
Thu Dec 15 21:04:00 GMT 2005
> I would like to get the following existing test:
>
> testsuite/23_containers/vector/element_access/1.cc
>
> to work correctly when the libstdc++ is compiled as a dynamic library
> and used with -fvisiblity=hidden from the command line. At issue is
> that (most of) the exceptions defined in <stdexcept> have no "key
> function" (reference http://www.codesourcery.com/cxx-abi/
> abi.html#vague ), and thus their type_info's are emitted everywhere
> used. Since we compare type_info's only by address, when libstdc++
> throw's an out_of_range, the client can't catch it because it has a
> local type_info for out_of_range that doesn't match the one internal
> to libstdc++.
See:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664
This is being worked on, and should not be solved piecemeal, one header
at a time.
> We already wrap <exception> this way and for this purpose. The patch
> below does the same thing for <stdexcept>. I would also like to add
> a copy of testsuite/23_containers/vector/element_access/1.cc, named
> testsuite/23_containers/vector/element_access/2.cc which has the
> single additional line:
>
> // { dg-options "-fvisibility=hidden" }
>
> Only I don't know the proper way to ask for a new file. :-)
Just add it to your repository, do
svn add newfile.cc
and then when you submit your diff it will show up.
best,
benjamin
More information about the Libstdc++
mailing list