diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2001-11-19 02:43:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2001-11-19 02:43:32 +0000 |
commit | 755407600fec4e6ec6aefbc5e9192fa278e92035 (patch) | |
tree | 031d9a480d3af83f18e734e00e48fbfd4465d0d4 /gcc | |
parent | 7db43d37b15e430b710d10bf4b8530ab6eee8a57 (diff) | |
download | gcc-755407600fec4e6ec6aefbc5e9192fa278e92035.zip gcc-755407600fec4e6ec6aefbc5e9192fa278e92035.tar.gz gcc-755407600fec4e6ec6aefbc5e9192fa278e92035.tar.bz2 |
mmix.c (mmix_cc1_ignored_option): Const-ify.
* mmix.c (mmix_cc1_ignored_option): Const-ify.
(mmix_init_machine_status): Make static to match declaration.
(mmix_unique_section): Const-ify.
(mmix_output_quoted_string): Avoid automatic aggregate
initialization.
(mmix_output_register_setting): Likewise.
(mmix_output_shiftvalue_op_from_str): Likewise.
* mmix.h (mmix_cc1_ignored_option): Const-ify.
(ASM_OUTPUT_BYTE): Fix format specifier warning.
(ASM_GENERATE_INTERNAL_LABEL): Likewise.
From-SVN: r47164
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/config/mmix/mmix.c | 12 | ||||
-rw-r--r-- | gcc/config/mmix/mmix.h | 6 |
3 files changed, 23 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11dbf10..a3fd987 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2001-11-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * mmix.c (mmix_cc1_ignored_option): Const-ify. + (mmix_init_machine_status): Make static to match declaration. + (mmix_unique_section): Const-ify. + (mmix_output_quoted_string): Avoid automatic aggregate + initialization. + (mmix_output_register_setting): Likewise. + (mmix_output_shiftvalue_op_from_str): Likewise. + + * mmix.h (mmix_cc1_ignored_option): Const-ify. + (ASM_OUTPUT_BYTE): Fix format specifier warning. + (ASM_GENERATE_INTERNAL_LABEL): Likewise. + 2001-11-18 Craig Rodrigues <rodrigc@gcc.gnu.org> PR c/4448 diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 737f6c7..42ee8ed 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -70,7 +70,7 @@ rtx mmix_compare_op1; /* We ignore some options with arguments. They are passed to the linker, but also ends up here because they start with "-m". We tell the driver to store them in a variable we don't inspect. */ -char *mmix_cc1_ignored_option; +const char *mmix_cc1_ignored_option; /* Declarations of locals. */ @@ -143,7 +143,7 @@ mmix_init_expanders () /* Set the per-function data. */ -void +static void mmix_init_machine_status (f) struct function *f; { @@ -1769,7 +1769,7 @@ mmix_unique_section (decl, reloc) const char *name; char *string; const char *prefix; - static const char *prefixes[4][2] = + static const char *const prefixes[4][2] = { { ".text.", ".gnu.linkonce.t." }, { ".rodata.", ".gnu.linkonce.r." }, @@ -1857,7 +1857,7 @@ mmix_output_quoted_string (stream, string, length) int length; { const char * string_end = string + length; - const char unwanted_chars[] = "\"[]\\"; + static const char *const unwanted_chars = "\"[]\\"; /* Output "any character except newline and double quote character". We play it safe and avoid all control characters too. We also do not @@ -2569,7 +2569,7 @@ mmix_output_register_setting (stream, regno, value, do_begin_end) else { /* The generic case. 2..4 insns. */ - const char *const higher_parts[] = {"L", "ML", "MH", "H"}; + static const char *const higher_parts[] = {"L", "ML", "MH", "H"}; const char *op = "SET"; const char *line_begin = ""; int i; @@ -2871,7 +2871,7 @@ mmix_output_shiftvalue_op_from_str (stream, mainop, value) const char *mainop; HOST_WIDEST_INT value; { - const char *const op_part[] = {"L", "ML", "MH", "H"}; + static const char *const op_part[] = {"L", "ML", "MH", "H"}; int i; if (! mmix_shiftable_wyde_value (value)) diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h index b96fda1..5d72ce9 100644 --- a/gcc/config/mmix/mmix.h +++ b/gcc/config/mmix/mmix.h @@ -129,7 +129,7 @@ struct machine_function %{!melf:-m mmo}%{melf:-m elf64mmix}" /* Put unused option values here. */ -extern char *mmix_cc1_ignored_option; +extern const char *mmix_cc1_ignored_option; #define TARGET_OPTIONS \ {{"set-program-start=", &mmix_cc1_ignored_option, \ @@ -1017,7 +1017,7 @@ const_section () \ } while (0) #define ASM_OUTPUT_BYTE(STREAM, VALUE) \ - fprintf (STREAM, "\tBYTE %d\n", (VALUE) & 255) + fprintf (STREAM, "\tBYTE %d\n", (int) (VALUE) & 255) #define ASM_BYTE_OP "\tBYTE\t" @@ -1066,7 +1066,7 @@ const_section () \ /* We insert a ":" to disambiguate against user symbols like L5. */ #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ - sprintf (LABEL, "*%s:%ld", PREFIX, NUM) + sprintf (LABEL, "*%s:%ld", PREFIX, (long)(NUM)) /* Insert "::"; these are rarer than internal labels. FIXME: Make sure no ":" is seen in the object file; we don't really want that mmixal |