The following could should produce a warning but it doesn't. struct Foo { template <class Bar> void foo() __attribute__((deprecated)); };
template <class Bar> void Foo::foo() {} int main () { Foo f; f.foo<int>(); } My compiler is g++-4.3 (Debian 4.3.0-3) 4.3.1 20080401 (prerelease) This is a regression. It works for g++-3.3 (GCC) 3.3.6 (Debian 1:3.3.6-15) It does not work for g++-3.4 (GCC) 3.4.6 (Debian 3.4.6-6) g++-4.1 (GCC) 4.1.3 20080114 (prerelease) (Debian 4.1.2-19) g++-4.2 (GCC) 4.2.3 (Debian 4.2.3-5) -- Summary: __attribute__((deprecated)) does not work for member templates Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sander at mi dot fu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36307