------- Comment #3 from jason at redhat dot com  2008-01-04 22:23 -------
Subject: Re:  attribute deprecated vs. templates

niemayer at isg dot de wrote:
> I can second that problem for template member functions - in contrast to
> non-template member functions, where the attribute works.

This is a parser bug: parsing the member template declaration winds up 
in cp_parser_init_declarator, which ignores attributes at the end of a 
declaration.  A normal member function goes through 
cp_parser_member_declaration, which handles the attributes properly. 
You can work around this bug by moving the attribute into the 
decl-specifier-seq, i.e. "void __attribute ((deprecated)) foo(T&)".

Jason


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33911

Reply via email to