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] Remove superfluous temporary from build_offset_ref in cp/init.c


The following patch removes the superfluous temporary "fnfields"
from build_offset_ref in cp/init.c.

Bootstrapped and regtested on x86_64-unknown-linux-gnu.
Ok for mainline?

Regards,
Volker

:ADDPATCH C++:


2006-03-20  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>

	* init.c (build_offset_ref): Remove superfluous temporary.

===================================================================
--- gcc/gcc/cp/init.c	(revision 112222)
+++ gcc/gcc/cp/init.c	(working copy)
@@ -1379,8 +1379,7 @@ build_offset_ref (tree type, tree member,
   if (BASELINK_P (member))
     {
       /* Go from the TREE_BASELINK to the member function info.  */
-      tree fnfields = member;
-      tree t = BASELINK_FUNCTIONS (fnfields);
+      tree t = BASELINK_FUNCTIONS (member);
 
       if (TREE_CODE (t) != TEMPLATE_ID_EXPR && !really_overloaded_fn (t))
 	{
@@ -1406,10 +1405,7 @@
 	  member = t;
 	}
       else
-	{
-	  TREE_TYPE (fnfields) = unknown_type_node;
-	  member = fnfields;
-	}
+	TREE_TYPE (member) = unknown_type_node;
     }
   else if (address_p && TREE_CODE (member) == FIELD_DECL)
     /* We need additional test besides the one in
===================================================================



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