Missing bits from N4268, constant evaluation for all non-type args.
authorJason Merrill <jason@redhat.com>
Sat, 10 Jun 2017 00:40:50 +0000 (20:40 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sat, 10 Jun 2017 00:40:50 +0000 (20:40 -0400)
commite6d7d61861c8fa7207570abb6fc23c5a2921e4da
tree8d20815456dbc2d945ec18a4963a28ba3b75f5e9
parent8b8b203a26bdac3dede77e76d06e4e7084f79acc
Missing bits from N4268, constant evaluation for all non-type args.

* call.c (build_converted_constant_expr): Rename from
build_integral_nontype_arg_conv, handle all types.
* pt.c (convert_nontype_argument): In C++17 call it for all types.
Move NOP stripping inside pointer case, don't strip ADDR_EXPR.
* cvt.c (strip_fnptr_conv): Also strip conversions to the same type.

From-SVN: r249089
16 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C
gcc/testsuite/g++.dg/template/crash106.C
gcc/testsuite/g++.dg/template/crash84.C
gcc/testsuite/g++.dg/template/crash87.C
gcc/testsuite/g++.dg/template/dependent-args1.C
gcc/testsuite/g++.dg/template/nontype-array1.C
gcc/testsuite/g++.dg/template/nontype13.C
gcc/testsuite/g++.dg/template/nontype21.C
gcc/testsuite/g++.dg/template/nontype26.C
gcc/testsuite/g++.dg/template/ptrmem20.C
gcc/testsuite/g++.dg/template/ptrmem8.C