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


Doug Gregor wrote:
> On 11 Mar 2007 09:41:36 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
>> "Doug Gregor" <doug.gregor@gmail.com> writes:
>> The overload resolution process and template argument deduction rules
>> are central part of the compiler that I would prefer distinct notions
>> -- and rvalue references *are* different from references -- get
>> distinct node types.
>> G++ has a long record of bugs related to bit fiddling for "related
>> notions"; many of them got eventually fixed by introducing due
>> abstractions that differentiate them properly.
> 
> Just so we know what we're dealing with... a quick survery shows about
> 157 uses of REFERENCE_TYPE in the C++ front end, plus another 55 in
> the common bits. That's compared to the 22 uses of TYPE_REF_IS_RVALUE
> introduced by Russell's patch.

I agree.

There's no way to avoid analyzing all current users of REFERENCE_TYPE to
decide if they have to change for rvalue references.  But, if most of
the cases are going to be the same for rvalue and lvalue references,
then it's better to leave them the using the same code.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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