[C++ PATCH] Fix dynamic_cast<XXX &> in template (PR c++/34364)
Mark Mitchell
mark@codesourcery.com
Mon Dec 10 23:06:00 GMT 2007
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
More information about the Gcc-patches
mailing list