This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c++/33871] [4.3 Regression] typeinfo name referenced in ... defined in discarded section



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


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