This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: PATCH to reconstruct_complex_type to preserve attributes


While working on c++/9381 I noticed this as another place we were rebuilding types but not preserving attributes. OK for trunk?

Tested x86_64-pc-linux-gnu, applied to trunk.
commit 024ed6cf7d6bd427cc747f273b20a3a166ff2dc2
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Nov 6 15:38:49 2009 -0500

    	* tree.c (reconstruct_complex_type): Preserve attributes.

diff --git a/gcc/tree.c b/gcc/tree.c
index f3970dd..b386334 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -9214,7 +9214,8 @@ reconstruct_complex_type (tree type, tree bottom)
   else
     return bottom;
 
-  return build_qualified_type (outer, TYPE_QUALS (type));
+  return build_type_attribute_qual_variant (outer, TYPE_ATTRIBUTES (type),
+					    TYPE_QUALS (type));
 }
 
 /* Returns a vector tree node given a mode (integer, vector, or BLKmode) and


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]