Commit 75540760 by Kaveh R. Ghazi Committed by Kaveh Ghazi

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
parent 7db43d37
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> 2001-11-18 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR c/4448 PR c/4448
......
...@@ -70,7 +70,7 @@ rtx mmix_compare_op1; ...@@ -70,7 +70,7 @@ rtx mmix_compare_op1;
/* We ignore some options with arguments. They are passed to the linker, /* 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 but also ends up here because they start with "-m". We tell the driver
to store them in a variable we don't inspect. */ to store them in a variable we don't inspect. */
char *mmix_cc1_ignored_option; const char *mmix_cc1_ignored_option;
/* Declarations of locals. */ /* Declarations of locals. */
...@@ -143,7 +143,7 @@ mmix_init_expanders () ...@@ -143,7 +143,7 @@ mmix_init_expanders ()
/* Set the per-function data. */ /* Set the per-function data. */
void static void
mmix_init_machine_status (f) mmix_init_machine_status (f)
struct function *f; struct function *f;
{ {
...@@ -1769,7 +1769,7 @@ mmix_unique_section (decl, reloc) ...@@ -1769,7 +1769,7 @@ mmix_unique_section (decl, reloc)
const char *name; const char *name;
char *string; char *string;
const char *prefix; const char *prefix;
static const char *prefixes[4][2] = static const char *const prefixes[4][2] =
{ {
{ ".text.", ".gnu.linkonce.t." }, { ".text.", ".gnu.linkonce.t." },
{ ".rodata.", ".gnu.linkonce.r." }, { ".rodata.", ".gnu.linkonce.r." },
...@@ -1857,7 +1857,7 @@ mmix_output_quoted_string (stream, string, length) ...@@ -1857,7 +1857,7 @@ mmix_output_quoted_string (stream, string, length)
int length; int length;
{ {
const char * string_end = string + 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 /* Output "any character except newline and double quote character". We
play it safe and avoid all control characters too. We also do not 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) ...@@ -2569,7 +2569,7 @@ mmix_output_register_setting (stream, regno, value, do_begin_end)
else else
{ {
/* The generic case. 2..4 insns. */ /* 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 *op = "SET";
const char *line_begin = ""; const char *line_begin = "";
int i; int i;
...@@ -2871,7 +2871,7 @@ mmix_output_shiftvalue_op_from_str (stream, mainop, value) ...@@ -2871,7 +2871,7 @@ mmix_output_shiftvalue_op_from_str (stream, mainop, value)
const char *mainop; const char *mainop;
HOST_WIDEST_INT value; 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; int i;
if (! mmix_shiftable_wyde_value (value)) if (! mmix_shiftable_wyde_value (value))
......
...@@ -129,7 +129,7 @@ struct machine_function ...@@ -129,7 +129,7 @@ struct machine_function
%{!melf:-m mmo}%{melf:-m elf64mmix}" %{!melf:-m mmo}%{melf:-m elf64mmix}"
/* Put unused option values here. */ /* Put unused option values here. */
extern char *mmix_cc1_ignored_option; extern const char *mmix_cc1_ignored_option;
#define TARGET_OPTIONS \ #define TARGET_OPTIONS \
{{"set-program-start=", &mmix_cc1_ignored_option, \ {{"set-program-start=", &mmix_cc1_ignored_option, \
...@@ -1017,7 +1017,7 @@ const_section () \ ...@@ -1017,7 +1017,7 @@ const_section () \
} while (0) } while (0)
#define ASM_OUTPUT_BYTE(STREAM, VALUE) \ #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" #define ASM_BYTE_OP "\tBYTE\t"
...@@ -1066,7 +1066,7 @@ const_section () \ ...@@ -1066,7 +1066,7 @@ const_section () \
/* We insert a ":" to disambiguate against user symbols like L5. */ /* We insert a ":" to disambiguate against user symbols like L5. */
#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ #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 /* Insert "::"; these are rarer than internal labels. FIXME: Make sure no
":" is seen in the object file; we don't really want that mmixal ":" is seen in the object file; we don't really want that mmixal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment