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: fix PR 32948


This patch fixes PR other/32948, removing some warnings produced when
building GCC with the Intel compiler.  I produced this patch from
inspection of the compiler warnings reported by the submitter.  Tested
with a bootstrap on powerpc64-linux-gnu.

Okay for the trunk?

Thanks, Ben


commit 8bf7b10c2756d5769d56ccbbb32830d981560ffb
Author: Ben Elliston <bje@au.ibm.com>
Date:   Fri Feb 1 16:34:20 2008 +1100

    Fix other/32948.

diff --git a/fixincludes/fixincl.c b/fixincludes/fixincl.c
index ccb2bad..a6a8abe 100644
--- a/fixincludes/fixincl.c
+++ b/fixincludes/fixincl.c
@@ -1046,11 +1046,8 @@ fix_applies (tFixDesc* p_fixd)
 
   if (pz_scan != (char *) NULL)
     {
-      size_t name_len;
-
       while ((pz_fname[0] == '.') && (pz_fname[1] == '/'))
         pz_fname += 2;
-      name_len = strlen (pz_fname);
 
       for (;;)
         {
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index e997dc6..352c988 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1223,7 +1223,6 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge **crossing_edges,
 						      int *max_idx)
 {
   basic_block bb;
-  bool has_hot_blocks = false;
   edge e;
   int i;
   edge_iterator ei;
@@ -1235,10 +1234,7 @@ find_rarely_executed_basic_blocks_and_crossing_edges (edge **crossing_edges,
       if (probably_never_executed_bb_p (bb))
 	BB_SET_PARTITION (bb, BB_COLD_PARTITION);
       else
-	{
-	  BB_SET_PARTITION (bb, BB_HOT_PARTITION);
-	  has_hot_blocks = true;
-	}
+	BB_SET_PARTITION (bb, BB_HOT_PARTITION);
     }
 
   /* Mark every edge that crosses between sections.  */
@@ -1524,7 +1520,6 @@ fix_crossing_conditional_branches (void)
   basic_block new_bb;
   basic_block last_bb;
   basic_block dest;
-  basic_block prev_bb;
   edge succ1;
   edge succ2;
   edge crossing_edge;
@@ -1605,7 +1600,6 @@ fix_crossing_conditional_branches (void)
 		  new_bb = create_basic_block (NULL, NULL, last_bb);
 		  new_bb->aux = last_bb->aux;
 		  last_bb->aux = new_bb;
-		  prev_bb = last_bb;
 		  last_bb = new_bb;
 		  /* Put appropriate instructions in new bb.  */
 
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 1af84da..4e9564d 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3977,7 +3977,6 @@ grokdeclarator (const struct c_declarator *declarator,
   int volatilep;
   int type_quals = TYPE_UNQUALIFIED;
   const char *name, *orig_name;
-  tree typedef_type = 0;
   bool funcdef_flag = false;
   bool funcdef_syntax = false;
   int size_varies = 0;
@@ -4051,7 +4050,6 @@ grokdeclarator (const struct c_declarator *declarator,
       type = integer_type_node;
     }
 
-  typedef_type = type;
   size_varies = C_TYPE_VARIABLE_SIZE (type);
 
   /* Diagnose defaulting to "int".  */
@@ -4701,7 +4699,6 @@ grokdeclarator (const struct c_declarator *declarator,
 
     if (decl_context == PARM)
       {
-	tree type_as_written;
 	tree promoted_type;
 
 	/* A parameter declared as an array of T is really a pointer to T.
@@ -4737,8 +4734,6 @@ grokdeclarator (const struct c_declarator *declarator,
 	else if (type_quals)
 	  type = c_build_qualified_type (type, type_quals);
 
-	type_as_written = type;
-
 	decl = build_decl (PARM_DECL, declarator->u.id, type);
 	DECL_SOURCE_LOCATION (decl) = declarator->id_loc;
 	if (size_varies)



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