This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]