C++ PATCH for c++/49418 (lost cv-quals on template parameter type)

Jason Merrill jason@redhat.com
Tue Jun 21 20:11:00 GMT 2011


cv-qualifiers are dropped from a function parameter type in order to 
produce the parameter-type-list, but the parameter itself still has the 
qualified type within the function body.  When I added cv-qualification 
stripping to type_decays_to, it started affecting instantiation of 
template function parameters, which is wrong.  So I've reverted that 
change and instead added explicit cv-qualification stripping to 
lambda_return_type.

While looking at this, I've also changed a few more TYPE_MAIN_VARIANTs 
to cv_unqualified.

Tested x86_64-pc-linux-gnu, applying to trunk.  I'll apply the first 
part to 4.6 after the branch unfreezes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 49418.patch
Type: text/x-patch
Size: 3744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110621/e708fced/attachment.bin>


More information about the Gcc-patches mailing list