Bug 33912 - attribute deprecated vs. templates
Summary: attribute deprecated vs. templates
Status: RESOLVED DUPLICATE of bug 33911
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2007-10-26 15:46 UTC by Benjamin Kosnik
Modified: 2007-10-26 16:08 UTC (History)
1 user (show)

See Also:
Host: all
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Kosnik 2007-10-26 15:46:53 UTC
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.
Comment 1 Paolo Carlini 2007-10-26 16:08:26 UTC

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