This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33911] attribute deprecated vs. templates
- From: "eraman at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Oct 2013 00:06:09 +0000
- Subject: [Bug c++/33911] attribute deprecated vs. templates
- Auto-submitted: auto-generated
- References: <bug-33911-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33911
Easwaran Raman <eraman at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |eraman at google dot com
--- Comment #10 from Easwaran Raman <eraman at google dot com> ---
For template member functions, is concatenating the parsed attributes to
prefix_attributes and passing them to grokfield a valid fix? This patch works
for a small test case I have and I wonder if this is correct:
Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c (revision 202261)
+++ gcc/cp/parser.c (working copy)
@@ -16489,7 +16489,7 @@ cp_parser_init_declarator (cp_parser* parser,
decl = grokfield (declarator, decl_specifiers,
initializer, !is_non_constant_init,
/*asmspec=*/NULL_TREE,
- prefix_attributes);
+ chainon (prefix_attributes, attributes));
if (decl && TREE_CODE (decl) == FUNCTION_DECL)
cp_parser_save_default_args (parser, decl);
}