https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97475
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Well that's about the linkage of such entities, this is about whether they are ill-formed. The rule that makes this ill-formed was added by https://wg21.link/p1766r1 but was approved as a defect report against previous standards.