https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89894
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- Actually, it's not specific to non-type specializations or even templates. The same problem happens with ordinary types. Non-type template specializations just exacerbate it. $ cat z.C && gcc -c -Wall z.C struct A { }; typedef A B; typedef A T; typedef B U; void h (T) { } void h (U) { } z.C:8:6: error: redefinition of ‘void h(U)’ 8 | void h (U) { } | ^ z.C:7:6: note: ‘void h(T)’ previously defined here 7 | void h (T) { } | ^