diff options
author | Joern Rennecke <amylaar@spamcop.net> | 2010-11-05 18:46:22 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2010-11-05 18:46:22 +0000 |
commit | 444d6efeb6561816dcf69fcf0202597231eb88a0 (patch) | |
tree | 4abc0d82ee5fa2b59f91fed31d3f65b72e094d2d /gcc/config/m32c/m32c-pragma.c | |
parent | b71e5eba5e3cab860b00dd7328d15b5a6fd30058 (diff) | |
download | gcc-444d6efeb6561816dcf69fcf0202597231eb88a0.zip gcc-444d6efeb6561816dcf69fcf0202597231eb88a0.tar.gz gcc-444d6efeb6561816dcf69fcf0202597231eb88a0.tar.bz2 |
re PR target/44754 (m32c_pragma_memregs / m32c_pragma_address warnings)
PR target/44754
* config/m32c/m32c.c (m32_function_arg): Rename declaration to...
(m32c_function_arg). Add comma between arguments two and three.
(m32c_promote_prototypes): Remove declaration.
(current_function_special_page_vector): Likewise.
(m32c_regno_reg_class): Change return type to enum reg_class.
(m32c_pushm_popm): Use add_reg_note.
(m32c_push_rounding): Change return type to unsigned int.
(m32c_legitimize_reload_address): Cast argument 11 to push_reload to
enum reload_type.
(m32c_insert_attributes): Constify variable name.
(m32c_output_aligned_common): Add ATTRIBUTE_UNUSED to argument decl.
(m32c_prepare_shift): Remove variable lref.
(m32c_expand_movcc): Remove variable cmp.
(m32c_expand_insv): Fix check of op0 rtx_code to use GET_CODE.
(m32c_compare_redundant): Remove variable op2.
* config/m32c/m32c-pragma.c ("c-family/c-common.h"): Include.
(m32c_pragma_memregs): Assign the number to target_memregs.
(m32c_pragma_address): Remove variable var_str.
* config/m32c/m32c.h (REG_CLASS_FROM_CONSTRAINT): Case value to
enum reg_class.
(LIMIT_RELOAD_CLASS, SECONDARY_RELOAD_CLASS): Likewise.
* config/m32c/bitops.md (andsi3): Add default case to switch.
(iorsi3, xorsi3): Likewise.
* config/m32c/addsub.md (addsi3_1, subsi3_1): Likewise.
* config/m32c/jump.md (call, call_value): Likewise.
* config/m32c/m32c-protos.h (m32c_push_rounding): Update prototype.
(m32c_regno_reg_class): Likewise.
(current_function_special_page_vector): Declare.
From-SVN: r166370
Diffstat (limited to 'gcc/config/m32c/m32c-pragma.c')
-rw-r--r-- | gcc/config/m32c/m32c-pragma.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/config/m32c/m32c-pragma.c b/gcc/config/m32c/m32c-pragma.c index f8a66ad..f3f1ca9 100644 --- a/gcc/config/m32c/m32c-pragma.c +++ b/gcc/config/m32c/m32c-pragma.c @@ -24,9 +24,10 @@ #include "coretypes.h" #include "tm.h" #include "tree.h" +#include "c-family/c-pragma.h" +#include "c-family/c-common.h" #include "diagnostic-core.h" #include "toplev.h" -#include "c-family/c-pragma.h" #include "cpplib.h" #include "hard-reg-set.h" #include "output.h" @@ -49,7 +50,6 @@ m32c_pragma_memregs (cpp_reader * reader ATTRIBUTE_UNUSED) tree val; enum cpp_ttype type; HOST_WIDE_INT i; - static char new_number[3]; type = pragma_lex (&val); if (type == CPP_NUMBER) @@ -70,10 +70,7 @@ m32c_pragma_memregs (cpp_reader * reader ATTRIBUTE_UNUSED) "#pragma GCC memregs must precede any function decls"); return; } - new_number[0] = (i / 10) + '0'; - new_number[1] = (i % 10) + '0'; - new_number[2] = 0; - target_memregs = new_number; + target_memregs = i; m32c_conditional_register_usage (); } else @@ -97,13 +94,10 @@ m32c_pragma_address (cpp_reader * reader ATTRIBUTE_UNUSED) /* on off */ tree var, addr; enum cpp_ttype type; - const char *var_str; type = pragma_lex (&var); if (type == CPP_NAME) { - var_str = IDENTIFIER_POINTER (var); - type = pragma_lex (&addr); if (type == CPP_NUMBER) { |