https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85437
Bug ID: 85437 Summary: [8 Regression] member pointer static upcast rejected in a constexpr context Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The following valid test case (extracted from bug 70248) is accepted by GCC 7 (and Clang and ICC) but rejected by GCC 8: $ cat pr70248.C && gcc -S -Wall pr70248.C struct A {}; struct B : A { int x; }; constexpr int A::*bx = static_cast<int(A::*)>(&B::x); pr70248.C:4:24: error: a reinterpret_cast is not a constant expression constexpr int A::*bx = static_cast<int(A::*)>(&B::x); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~