https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85438
Bug ID: 85438 Summary: [8 Regression] invalid "a reinterpret_cast is not a constant expression" diagnostics since r249088 Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: daniel.kruegler at googlemail dot com, jakub at gcc dot gnu.org, jason at gcc dot gnu.org, msebor at gcc dot gnu.org, unassigned at gcc dot gnu.org, webrown.cpp at gmail dot com Depends on: 70248 Blocks: 55004 Target Milestone: --- +++ This bug was initially created as a clone of Bug #70248 +++ struct A {}; struct B : A { int x; }; constexpr int A::*bx = (int(A::*))&B::x; is rejected since r249088 with: pr70248-2.C:3:24: error: a reinterpret_cast is not a constant expression constexpr int A::*bx = (int(A::*))&B::x; ^~~~~~~~~~~~~ Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70248 [Bug 70248] constexpr initialization with unspecified equality expression accepted