Bug 36307

Summary: __attribute__((deprecated)) does not work for member templates
Product: gcc Reporter: Oliver Sander <sander>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Severity: normal CC: fang, gcc-bugs, niemayer, pion.sylvain, sander
Priority: P3    
Version: 4.3.1   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Oliver Sander 2008-05-23 07:23:03 UTC
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;

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)
Comment 1 Andrew Pinski 2008-12-28 03:17:42 UTC

*** This bug has been marked as a duplicate of 33911 ***