https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98105
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced: ``` void f(const int&); namespace { struct myFactory { static constexpr int s_sList = 1; }; } //constexpr int myFactory::s_sList; void sdi_register_model() { f(myFactory::s_sList); } ``` If we uncomment the definition, it works. I think this is correct behavior, just we should produce a better error message of not have the definition and only the declaration here.