[PATCH] Fix PR C++/28886, Template specialization with array rejected
Andrew Pinski
pinskia@physics.uc.edu
Wed Aug 30 16:23:00 GMT 2006
The problem here is that fold will produce a NON_LVALUE_EXPR when
figuring out the size of the array but we are not ready to handle that.
This patch fixes the problem by stripping out the NON_LVALUE_EXPR right
after the fold that adds it.
OK? Bootstrapped and tested on i686-linux-gnu with no regressions.
Thanks,
Andrew Pinski
cp/ChangeLog:
* pt.c (unify): Strip nops that don't change the type after
calling fold for finding the length of the array.
testsuite/ChangeLog:
* g++.dg/template/partial-specialization-array.C: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixpr28886.diff.txt
Type: text/x-patch
Size: 909 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20060830/ef4b72dd/attachment.bin>
More information about the Gcc-patches
mailing list