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]

[Patch] Avoid useless type copy


Both calls (originally to copy_node) were introduced in 2000 but it looks like 
they were already useless by that time.

Tested on i586-suse-linux, OK for mainline?


2009-09-18  Eric Botcazou  <ebotcazou@adacore.com>

	* stor-layout.c (set_sizetype): Avoid useless type copy.


-- 
Eric Botcazou
Index: stor-layout.c
===================================================================
--- stor-layout.c	(revision 151832)
+++ stor-layout.c	(working copy)
@@ -2310,9 +2310,9 @@ set_sizetype (tree type)
   if (TYPE_UNSIGNED (type))
     {
       fixup_unsigned_type (bitsizetype);
-      ssizetype = build_distinct_type_copy (make_signed_type (oprecision));
+      ssizetype = make_signed_type (oprecision);
       TYPE_IS_SIZETYPE (ssizetype) = 1;
-      sbitsizetype = build_distinct_type_copy (make_signed_type (precision));
+      sbitsizetype = make_signed_type (precision);
       TYPE_IS_SIZETYPE (sbitsizetype) = 1;
     }
   else

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