re PR c++/13057 (regparm attribute not applied to destructor)

PR c++/13057
	* class.c (build_clone): Copy type attributes from the original
	function to the clone.

From-SVN: r75460
This commit is contained in:
Mark Mitchell 2004-01-06 02:26:13 +00:00 committed by Mark Mitchell
parent 856363c883
commit 221bfb0334
2 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2004-01-05 Mark Mitchell <mark@codesourcery.com>
PR c++/13057
* class.c (build_clone): Copy type attributes from the original
function to the clone.
PR c++/12815
* class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
references as constant.

View File

@ -3875,6 +3875,9 @@ build_clone (tree fn, tree name)
if (exceptions)
TREE_TYPE (clone) = build_exception_variant (TREE_TYPE (clone),
exceptions);
TREE_TYPE (clone)
= build_type_attribute_variant (TREE_TYPE (clone),
TYPE_ATTRIBUTES (TREE_TYPE (fn)));
}
/* Copy the function parameters. But, DECL_ARGUMENTS on a TEMPLATE_DECL