C++ PATCH for c++/48289 (-pedantic breaks std::move)

Jason Merrill jason@redhat.com
Fri Mar 25 16:11:00 GMT 2011


The problem here was that we were improperly treating 
static_cast<std::remove_reference<T>::type&&>(x) as an lvalue because 
the dereference was inside a NON_DEPENDENT_EXPR, which we always treat 
as an lvalue.  That seems like a bad assumption, but we can fix this bug 
simply by moving the dereference outside.

Tested x86_64-pc-linux-gnu, applied to trunk and 4.5, will apply to 4.6 
after 4.6.0.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 48289.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110325/deaad10a/attachment.ksh>


More information about the Gcc-patches mailing list