aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2018-04-25 09:10:16 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-04-25 09:10:16 +0200
commit7d75ea04cf6d9c8960d5c6119d6203568b7069e9 (patch)
tree0bb4f2c59a7c078ae71479a2a88c3202e7e2c396 /gcc/expr.c
parent908553397a611a367ac71670750d7025bffdf5c1 (diff)
downloadgcc-7d75ea04cf6d9c8960d5c6119d6203568b7069e9.zip
gcc-7d75ea04cf6d9c8960d5c6119d6203568b7069e9.tar.gz
gcc-7d75ea04cf6d9c8960d5c6119d6203568b7069e9.tar.bz2
re PR c++/85437 (member pointer static upcast rejected in a constexpr context)
PR c++/85437 PR c++/49171 * cp-tree.h (REINTERPRET_CAST_P): New. * constexpr.c (cxx_eval_constant_expression) <case NOP_EXPR>: Reject REINTERPET_CAST_P conversions. Use cplus_expand_constant for non-trivial PTRMEM_CST cases. * typeck.c (build_nop_reinterpret): New. (build_reinterpret_cast_1): Use it. Set REINTERPRET_CAST_P on NOP_EXPRs returned by cp_convert. * g++.dg/cpp0x/addressof1.C: Make reinterpret cases runtime checks. * g++.dg/cpp0x/constexpr-cast.C: Remove xfails * g++.dg/cpp0x/constexpr-nullptr-2.C: Likewise. * g++.dg/cpp0x/constexpr-pmf1.C: Check when optimized. * g++.dg/cpp0x/pr85437-1.C: New. * g++.dg/cpp0x/pr85437-2.C: New. * g++.dg/cpp0x/pr85437-3.C: New. * g++.dg/cpp0x/pr85437-4.C: New. From-SVN: r259629
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions