In the following example, class "foo" gets a deprecated warning, but a similar class template "goo" does not. Typedefs constructed with foo or goo get an error.
What up? struct foo { int i; } __attribute__ ((__deprecated__)); template<typename _Tp> struct goo { int i; } __attribute__ ((__deprecated__)); typedef foo foo_type __attribute__ ((__deprecated__)); typedef goo<int> goo_type __attribute__ ((__deprecated__)); int main() { foo f1; goo<int> f2; foo_type f3; goo_type f4; return 0; } I have a patch to mark the C++0x bits deprecated, but it's not working because of this issue. -- Summary: attribute deprecated vs. templates Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bkoz at gcc dot gnu dot org GCC host triplet: all http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33911