aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-01-06 02:26:13 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2004-01-06 02:26:13 +0000
commit221bfb0334fd47a1fc9e948088e037a060594ffe (patch)
tree1b3f1327ec729a653418386f9318f101bef6dbbb
parent856363c8838cfefffb161191355a4ca8548815f6 (diff)
downloadgcc-221bfb0334fd47a1fc9e948088e037a060594ffe.zip
gcc-221bfb0334fd47a1fc9e948088e037a060594ffe.tar.gz
gcc-221bfb0334fd47a1fc9e948088e037a060594ffe.tar.bz2
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
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/class.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3391529..4902224 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 31c6d22..49d21b7 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -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