c++: c++26 regression fixes
commit8d344146727da02eb5c62fbf6cee97a4e96d63db
authorJason Merrill <jason@redhat.com>
Fri, 14 Jul 2023 13:37:21 +0000 (14 09:37 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 14 Jul 2023 22:35:40 +0000 (14 18:35 -0400)
tree0347706ee6d8958ed23f47e994b4662f95d6477e
parent49a2a63e6518cfa294d903f5f62ab1f922df438e
c++: c++26 regression fixes

Apparently I wasn't actually running the testsuite in C++26 mode like I
thought I was, so there were some failures I wasn't seeing.

The constexpr hunk fixes regressions with the P2738 implementation; we still
need to use the old handling for casting from void pointers to heap
variables.

PR c++/110344

gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_constant_expression): Move P2738 handling
after heap handling.
* name-lookup.cc (get_cxx_dialect_name): Add C++26.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/constexpr-cast2.C: Adjust for P2738.
* g++.dg/ipa/devirt-45.C: Handle -fimplicit-constexpr.
gcc/cp/constexpr.cc
gcc/cp/name-lookup.cc
gcc/testsuite/g++.dg/cpp0x/constexpr-cast2.C
gcc/testsuite/g++.dg/ipa/devirt-45.C