This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section
- From: "gcc at magfr dot user dot lysator dot liu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2007 16:53:14 -0000
- Subject: [Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section
- References: <bug-33871-5606@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from gcc at magfr dot user dot lysator dot liu dot se 2007-10-30 16:53 -------
I agree that the linker should not drop the typeinfo when it is needed.
I could just tell that I see the problem on Linux so it isn't Darwin-specific.
> > Should the typeinfo for an anonymous namespace class be local if it inherits
> > from a class that is outside the anonymous namespace?
>
> Yes.
Fair enough
> > If that is the case, what should typeid(reference to base of anonymous class
> > instance) in another module return?
>
> The same thing it does now, which I believe is the typeinfo of the base class.
I follows the standard, so if base is polymorphic it returns the typeinfo
object for the actual type and if if base is nonpolymorphic it returns the
typeinfo object for base.
Could the requirements be aligned?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871