https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104682
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-02-24 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, it is not just the value but all enum types too: template<typename> struct S { enum B { A } __attribute__((deprecated)) ; }; struct S2 { enum B { A } __attribute__((deprecated)); }; void g () { S<int>::B a; // { dg-warning "is deprecated" } S2::B a1; // { dg-warning "is deprecated" } }