From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16584 invoked by alias); 26 Oct 2007 15:08:42 -0000 Received: (qmail 16522 invoked by uid 48); 26 Oct 2007 15:08:29 -0000 Date: Fri, 26 Oct 2007 15:08:00 -0000 Subject: [Bug c++/33911] New: attribute deprecated vs. templates X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bkoz at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg02305.txt.bz2 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 struct goo { int i; } __attribute__ ((__deprecated__)); typedef foo foo_type __attribute__ ((__deprecated__)); typedef goo goo_type __attribute__ ((__deprecated__)); int main() { foo f1; goo 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