re PR c++/13057 (regparm attribute not applied to destructor)
authorMark Mitchell <mark@codesourcery.com>
Tue, 6 Jan 2004 02:26:13 +0000 (02:26 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 6 Jan 2004 02:26:13 +0000 (02:26 +0000)
PR c++/13057
* class.c (build_clone): Copy type attributes from the original
function to the clone.

From-SVN: r75460

gcc/cp/ChangeLog
gcc/cp/class.c

index 3391529cc0f0562fae12250cdec9e18e2dec9b48..49022241678115bc78c574336e02bdd93dffacf9 100644 (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.
index 31c6d2291d993749f602b61ddf562158e90c3e18..49d21b746200c3b94827d573637c09abf3afad01 100644 (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