diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 379a7b56083aa058d39da05251d36002707b514f..af6b9572c915d981f701192c6e9fda5155c1bb89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2009-04-22 DJ Delorie <dj@redhat.com> + + * 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. + 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax. diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 5021831662fcb17868b106f7654b40945e02ce44..cb09aef254cf1e1e4a94f52a24eefeda3e6abdff 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -2771,10 +2771,12 @@ interrupt_handler (tree * node ATTRIBUTE_UNUSED, 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))) @@ -2837,12 +2839,13 @@ current_function_special_page_vector (rtx x) 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))) @@ -3870,6 +3873,7 @@ m32c_expand_insv (rtx *operands) 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);