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: "geoffk at geoffk dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2007 18:31: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 #17 from geoffk at geoffk dot org 2007-10-30 18:31 -------
Subject: Re: [4.3 Regression] typeinfo name referenced in ... defined in
discarded section
On 30/10/2007, at 9:53 AM, gcc at magfr dot user dot lysator dot liu
dot se wrote:
>>> 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?
I believe that the compiler now does what the standard says and can
continue to do so whether the typeinfo is local or not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33871