C++ PATCH for c++/49440 (wrong tinfo comparison with anonymous namespaces)

Jason Merrill jason@redhat.com
Thu Jun 23 16:53:00 GMT 2011


We were wrongly considering two classes in anonymous namespaces in 
different files to be the same class due to string comparison.  We have 
a way to avoid that, by putting a '*' at the beginning of the typeinfo 
name, but weren't doing that in this case because TREE_PUBLIC was 
wrongly set on the typeinfo by set_linkage_according_to_type.  Rather 
than try to fix that function, we should just use determine_visibility, 
which already gets this stuff right.

While looking at this, I also noticed that we were adopting a tentative 
alias as first_global_object_name because its linkage flags hadn't been 
set properly yet.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 49440.patch
Type: text/x-patch
Size: 2552 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110623/0a2c558d/attachment.bin>


More information about the Gcc-patches mailing list