https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- You can read up more on the one definition rule here: https://en.cppreference.com/w/cpp/language/definition It is a good summary of what the standard says.