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 process_template_parm in pt.c:


The following patch removes a superfluous temporary from
process_template_parm in pt.c:
The argument "next" of this function is copied to "parm" and then
not used anymore. The patch removes the definition of "parm" and
instead renames the argument to "parm".

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

Regards,
Volker

:ADDPATCH C++:


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

	* pt.c (process_template_parm): Remove superfluous temporary.

===================================================================
--- gcc/gcc/cp/pt.c	2006-05-04 21:49:04 +0200
+++ gcc/gcc/cp/pt.c	2006-05-04 21:49:18 +0200
@@ -2312,19 +2312,17 @@ reduce_template_parm_level (tree index, 
   return TEMPLATE_PARM_DESCENDANTS (index);
 }
 
-/* Process information from new template parameter NEXT and append it to the
+/* Process information from new template parameter PARM and append it to the
    LIST being built.  This new parameter is a non-type parameter iff
    IS_NON_TYPE is true.  */
 
 tree
-process_template_parm (tree list, tree next, bool is_non_type)
+process_template_parm (tree list, tree parm, bool is_non_type)
 {
-  tree parm;
   tree decl = 0;
   tree defval;
   int idx;
 
-  parm = next;
   gcc_assert (TREE_CODE (parm) == TREE_LIST);
   defval = TREE_PURPOSE (parm);
 
===================================================================



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