re PR c++/33911 (attribute deprecated vs. templates)
2013-10-03 Easwaran Raman <eraman@google.com> PR c++/33911 * parser.c (cp_parser_init_declarator): Do not drop attributes of template member functions. 2013-10-03 Easwaran Raman <eraman@google.com> PR c++/33911 * g++.dg/ext/attribute47.C: New. From-SVN: r203174
This commit is contained in:
parent
6867e128b9
commit
d1f11e2bae
|
@ -1,3 +1,9 @@
|
||||||
|
2013-10-03 Easwaran Raman <eraman@google.com>
|
||||||
|
|
||||||
|
PR c++/33911
|
||||||
|
* parser.c (cp_parser_init_declarator): Do not drop attributes
|
||||||
|
of template member functions.
|
||||||
|
|
||||||
2013-10-03 Marek Polacek <polacek@redhat.com>
|
2013-10-03 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c++/58510
|
PR c++/58510
|
||||||
|
|
|
@ -16548,7 +16548,7 @@ cp_parser_init_declarator (cp_parser* parser,
|
||||||
decl = grokfield (declarator, decl_specifiers,
|
decl = grokfield (declarator, decl_specifiers,
|
||||||
initializer, !is_non_constant_init,
|
initializer, !is_non_constant_init,
|
||||||
/*asmspec=*/NULL_TREE,
|
/*asmspec=*/NULL_TREE,
|
||||||
prefix_attributes);
|
chainon (attributes, prefix_attributes));
|
||||||
if (decl && TREE_CODE (decl) == FUNCTION_DECL)
|
if (decl && TREE_CODE (decl) == FUNCTION_DECL)
|
||||||
cp_parser_save_default_args (parser, decl);
|
cp_parser_save_default_args (parser, decl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-10-03 Easwaran Raman <eraman@google.com>
|
||||||
|
|
||||||
|
PR c++/33911
|
||||||
|
* g++.dg/ext/attribute47.C: New.
|
||||||
|
|
||||||
2013-10-03 Marek Polacek <polacek@redhat.com>
|
2013-10-03 Marek Polacek <polacek@redhat.com>
|
||||||
|
|
||||||
PR c++/58510
|
PR c++/58510
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-O2" }
|
||||||
|
|
||||||
|
class A
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
template <class T>
|
||||||
|
T foo(T a) __attribute__ ((noinline));
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
T A::foo(T a)
|
||||||
|
{
|
||||||
|
return a+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int bar(A a) {
|
||||||
|
return a.foo(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// { dg-final { scan-assembler "_ZN1A3fooIiEET_S1_" } }
|
Loading…
Reference in New Issue