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]

[m32c] minor warnings patch


Committed.

	* config/m32c/m32c.c (m32c_special_page_vector_p): Move
	declarations before code.
	(current_function_special_page_vector): Likewise.
	(m32c_expand_insv): Silence a warning.

Index: config/m32c/m32c.c
===================================================================
--- config/m32c/m32c.c	(revision 146613)
+++ config/m32c/m32c.c	(working copy)
@@ -2768,16 +2768,18 @@ interrupt_handler (tree * node ATTRIBUTE
 }
 
 /* Returns TRUE if given tree has the "function_vector" attribute. */
 int
 m32c_special_page_vector_p (tree func)
 {
+  tree list;
+
   if (TREE_CODE (func) != FUNCTION_DECL)
     return 0;
 
-  tree list = M32C_ATTRIBUTES (func);
+  list = M32C_ATTRIBUTES (func);
   while (list)
     {
       if (is_attribute_p ("function_vector", TREE_PURPOSE (list)))
         return 1;
       list = TREE_CHAIN (list);
     }
@@ -2834,18 +2836,19 @@ current_function_special_page_vector (rt
 {
   int num;
 
   if ((GET_CODE(x) == SYMBOL_REF)
       && (SYMBOL_REF_FLAGS (x) & SYMBOL_FLAG_FUNCVEC_FUNCTION))
     {
+      tree list;
       tree t = SYMBOL_REF_DECL (x);
 
       if (TREE_CODE (t) != FUNCTION_DECL)
         return 0;
 
-      tree list = M32C_ATTRIBUTES (t);
+      list = M32C_ATTRIBUTES (t);
       while (list)
         {
           if (is_attribute_p ("function_vector", TREE_PURPOSE (list)))
             {
               num = TREE_INT_CST_LOW (TREE_VALUE (TREE_VALUE (list)));
               return num;
@@ -3867,12 +3870,13 @@ m32c_expand_insv (rtx *operands)
     case 2: p = gen_andhi3_16 (op0, src0, GEN_INT (mask)); break;
     case 3: p = gen_andhi3_24 (op0, src0, GEN_INT (mask)); break;
     case 4: p = gen_iorqi3_16 (op0, src0, GEN_INT (mask)); break;
     case 5: p = gen_iorqi3_24 (op0, src0, GEN_INT (mask)); break;
     case 6: p = gen_iorhi3_16 (op0, src0, GEN_INT (mask)); break;
     case 7: p = gen_iorhi3_24 (op0, src0, GEN_INT (mask)); break;
+    default: p = NULL_RTX; break; /* Not reached, but silences a warning.  */
     }
 
   emit_insn (p);
   return 0;
 }
 


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