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

Russell Yanofsky russ@yanofsky.org
Mon Mar 19 13:21:00 GMT 2007

On Sun, 2007-03-11 at 17:24 -0400, Jason Merrill wrote:
> I think the boolean field is necessary, too, for distinguishing between 
> lvalue and rvalue types.  But it can be internal to the front end, 
> perhaps using TYPE_LANG_FLAG_2.

I can switch to that flag, but the problem is that if you want to use
_any_ flag to distinguish between REFERENCE_TYPE nodes, you have to
modify the code which creates REFERENCE_TYPE nodes to check that flag.
Otherwise, nodes which are supposed to have different flag values will
wind up occupying the same spot on the TYPE_NEXT_REF_TO chain. There's
no way to avoid modifying the middle end (even though those
modifications can be done in a language-neutral way) if we want to keep
on using REFERENCE_TYPE nodes to represent l-value and r-value
references in the front end. 

-  Russell Yanofsky (PGP ID: 0x5FAA0216)
-  http://russ.yanofsky.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070319/b94599c3/attachment.sig>

More information about the Gcc-patches mailing list