Patchwork [gccgo] Remove write-only variable, add #include

login
register
mail settings
Submitter Ian Taylor
Date Oct. 8, 2010, 8:47 p.m.
Message ID <mcry6a81kf6.fsf@google.com>
Download mbox | patch
Permalink /patch/67284/
State New
Headers show

Comments

Ian Taylor - Oct. 8, 2010, 8:47 p.m.
This gccgo patch removes a write-only variable and adds a #include in
preparation for a merge from gcc mainline.  Committed to gccgo branch.

Ian

Patch

diff -r d153c8c1d6f6 go/types.cc
--- a/go/types.cc	Fri Oct 08 13:42:46 2010 -0700
+++ b/go/types.cc	Fri Oct 08 13:44:39 2010 -0700
@@ -12,6 +12,7 @@ 
 
 extern "C"
 {
+#include "toplev.h"
 #include "intl.h"
 #include "tree.h"
 #include "gimple.h"
@@ -2867,7 +2868,6 @@ 
   // name.
   unsigned int found_depth = 0;
   Field_reference_expression* ret = NULL;
-  const Struct_field* parent = NULL;
   i = 0;
   for (Struct_field_list::const_iterator pf = fields->begin();
        pf != fields->end();
@@ -2895,7 +2895,6 @@ 
 	  if (ret != NULL)
 	    delete ret;
 	  ret = sub;
-	  parent = &*pf;
 	  found_depth = subdepth;
 	  Expression* here = Expression::make_field_reference(struct_expr, i,
 							      location);