https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90670
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED CC| |ppalka at gcc dot gnu.org --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- The warning seems right to me: the const DummyId has internal linkage, which makes the type seChildScheduleAccess<DummyId> have internal linkage, which makes the definition of seGccBugJob (strictly speaking) different in different TUs. So the warning is correctly exposing a potential ODR violation. To fix the ODR violation, you can declare DummyId 'inline'.