This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] <stdexcept> visibility


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]