https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120005
--- Comment #4 from Nathaniel Shead <nshead at gcc dot gnu.org> --- But as Andrew says, you can workaround the issue by declaring it 'inline' to prevent it from having internal linkage. This will also avoid any issues with accidental ODR usages from later maintenance.