]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR c++/13057 (regparm attribute not applied to destructor)
authorGabriel Dos Reis <gdr@integrable-solutions.net>
Wed, 21 Jan 2004 05:52:28 +0000 (05:52 +0000)
committerGabriel Dos Reis <gdr@gcc.gnu.org>
Wed, 21 Jan 2004 05:52:28 +0000 (05:52 +0000)
        Backport from mainline
        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.

From-SVN: r76258

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

index 2d0c3261a6bd9e1c747611b523cd08750548c3e8..c383f1cb3c82de29a5c1be3be618767bd67536f6 100644 (file)
@@ -1,3 +1,12 @@
+2004-01-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       Backport from mainline
+       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.
+       
 2004-01-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
        Backport from mainline
index 7640ad8047c9bc6b89a63626d4d713b5fa2ce9f3..3546743f215c09f08306da2aae8e698aee2afdae 100644 (file)
@@ -4103,6 +4103,9 @@ build_clone (fn, 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