https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105595
--- Comment #7 from dennis-hezel at gmx dot de --- I am perfectly happy with a fix just for coroutines! I do not have any code that contains your reproducer. It would also be a code smell: struct Y defined inside cpp file but not in anon namespace could lead to ODR violations, I mean that's exactly what the warning is trying to tell us :).