[PATCH] rvalue reference implementation for C++0x
Sun Mar 11 03:35:00 GMT 2007
On 3/10/07, Russell Yanofsky <firstname.lastname@example.org> wrote:
> It seems to me like everything you said is already implemented. Rvalue
> reference types become part of the TYPE_NEXT_REF_TO chain just like
> other variants of reference types. And build_reference_type() is the
> front-end wrapper for the build_reference_type_for_mode() function.
Really I don't think you should be touching middle-end code to do
support this feature because this is a very specific reference type to
C++ in the same way lvalues are speficic to the front-ends.
Also what does C++0x say about the aliasing sets of rvalue reference
type vs the reference type are they the same or can they be different?
I think it is better to create a new type in the C++ front-end and
mirror what is done building reference type but have a hash table
instead of using TYPE_REFERENCE_TO (really that code should be changed
to use a hash table instead of an extra field in the type anyways).
And during gimplification lower the type down to the reference type.
More information about the Gcc-patches