* parser.c (cp_parser_init_declarator): Pass attributes to
grokfield.
PR c++/24260
* g++.dg/ext/tmplattr1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105746
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-10-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/24260
+ * parser.c (cp_parser_init_declarator): Pass attributes to
+ grokfield.
+
2005-10-20 Mark Mitchell <mark@codesourcery.com>
PR c++/22618
}
decl = grokfield (declarator, decl_specifiers,
initializer, /*asmspec=*/NULL_TREE,
- /*attributes=*/NULL_TREE);
+ prefix_attributes);
if (decl && TREE_CODE (decl) == FUNCTION_DECL)
cp_parser_save_default_args (parser, decl);
}
+2005-10-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/24260
+ * g++.dg/ext/tmplattr1.C: New test.
+
2005-10-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/24440
--- /dev/null
+// PR c++/24260
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target ilp32 }
+
+#define stdcall __attribute__((stdcall))
+
+struct T {
+ template <class S>
+ static int stdcall func(int arg1, int arg2);
+};
+
+template <class S>
+int stdcall T::func(int arg1, int arg2)
+{
+ return arg1+arg2;
+}
+
+struct dummy {};
+
+void xx()
+{
+ int (stdcall *ptr2)(int,int) = &T::func<dummy>;
+}
+