[PATCH] rvalue reference implementation for C++0x

Andrew Pinski pinskia@gmail.com
Sun Mar 11 08:29:00 GMT 2007


On 3/10/07, Russell Yanofsky <russ@yanofsky.org> wrote:
> L-value references are already part of middle end code and I don't see
> why r-value references should be different. Are there actually other
> languages besides C++ which use REFERENCE_TYPE nodes?

Yes, the fortran front-end uses REFERENCE_TYPE for all argument types
as in Fortran every function argument is passed via reference and not
via value.  The main reason why Fortran uses it is so they get the
correct debugging information for arguments.

Ada also uses REFERENCE_TYPE but I don't know what for.  You know if
you did a quick search for build_reference_type in */*.c you would
have found these uses :).

In fact there are some people who want to get rid of REFERENCE_TYPE
and make it a flag off of POINTER_TYPE.

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list