This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Fix dynamic_cast<XXX &> in template (PR c++/34364)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Dec 2007 15:05:58 -0800
- Subject: Re: [C++ PATCH] Fix dynamic_cast<XXX &> in template (PR c++/34364)
- References: <20071210223945.GL20451@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> 2007-12-10 Jakub Jelinek <jakub@redhat.com>
>
> PR c++/34364
> * rtti.c (build_dynamic_cast): Call convert_from_reference even for
> dynamic_cast in a template.
>
> * g++.dg/rtti/dyncast2.C: New test.
Good work, this is fine.
(This is the long-standing issue that C++ does not have expressions of
reference type. Variables and data members can have reference type, and
functions can return reference types, but expressions as such always
have non-reference types. But, we've never quite made the internal
representation consistent with that.)
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713