https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111923
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For the non-static case, "default member initializer" applies. That is: ``` #include <cstddef> struct A { char a; static constexpr int off_p = offsetof(A, a); }; ``` is illformed too. But ``` #include <cstddef> struct A { char a; int off_p = offsetof(A, a); }; ``` is well formed due to it being a DMI.