Fix some blockers of PR c++/24666 (arrays decay to pointers too early)
authorPatrick Palka <ppalka@gcc.gnu.org>
Thu, 17 Dec 2015 04:01:47 +0000 (04:01 +0000)
committerPatrick Palka <ppalka@gcc.gnu.org>
Thu, 17 Dec 2015 04:01:47 +0000 (04:01 +0000)
commitf85e1317f8ea933f5c615680353bd646f480f7d3
tree5e30c38f716a0c0974f3789b148f2648e1ce888e
parent5fdfa03e795034058a66f641eb9d1f4499052639
Fix some blockers of PR c++/24666 (arrays decay to pointers too early)

gcc/cp/ChangeLog:

PR c++/16333
PR c++/41426
PR c++/59878
PR c++/66895
* typeck.c (convert_for_initialization): Don't perform an early
decaying conversion if converting to a class type.

gcc/testsuite/ChangeLog:

PR c++/16333
PR c++/41426
PR c++/59878
PR c++/66895
* g++.dg/conversion/pr16333.C: New test.
* g++.dg/conversion/pr41426.C: New test.
* g++.dg/conversion/pr59878.C: New test.
* g++.dg/conversion/pr66895.C: New test.

From-SVN: r231736
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/conversion/pr16333.C [new file with mode: 0644]
gcc/testsuite/g++.dg/conversion/pr41426.C [new file with mode: 0644]
gcc/testsuite/g++.dg/conversion/pr59878.C [new file with mode: 0644]
gcc/testsuite/g++.dg/conversion/pr66895.C [new file with mode: 0644]