Re: C++ PATCH for c++/51406, 51161 (wrong-code with static cast to rvalue ref)

2016-03-03 Thread Jason Merrill
On 12/14/2011 12:14 AM, Jason Merrill wrote: The code for casting to rvalue ref was assuming that no base adjustment would be necessary. This patch delegates to the normal lvalue binding code, and then changes the result to be an rvalue reference. The test for DECL_P isn't sufficient to catch

C++ PATCH for c++/51406, 51161 (wrong-code with static cast to rvalue ref)

2011-12-13 Thread Jason Merrill
The code for casting to rvalue ref was assuming that no base adjustment would be necessary. This patch delegates to the normal lvalue binding code, and then changes the result to be an rvalue reference. Tested x86_64-pc-linux-gnu, applying to trunk. Will apply to 4.5/4.6 as well after testin