This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33911] New: attribute deprecated vs. templates
- From: "bkoz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2007 15:08:29 -0000
- Subject: [Bug c++/33911] New: attribute deprecated vs. templates
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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