This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33470] Reassignment of a reference to a polymorphic class fails at runtime
- From: "photon at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Sep 2007 12:01:37 -0000
- Subject: [Bug c++/33470] Reassignment of a reference to a polymorphic class fails at runtime
- References: <bug-33470-15110@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from photon at seznam dot cz 2007-09-18 12:01 -------
(In reply to comment #1)
> No, "B" is correct.
>
>
> A &Aref = Binst;
> Aref = Cinst;
>
> is the same as:
> Binst = (A)Cinst;
>
"Binst = (A)Cinst" would not compile (C is not derived from B).
--
photon at seznam dot cz changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33470