https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114933
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The easy fix is to do: extern "C++" { template<bool> struct __MCF_static_assert; } extern "C++" { template<> struct __MCF_static_assert<true> { }; } Note from the commit message: However there are also a couple of changes made to linkage specifiers ('extern "C"'); I've applied these as since C++20, to line up with when modules were actually introduced.