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)
*** This bug has been marked as a duplicate of 33911 ***