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
This commit is contained in:
parent
7db43d37b1
commit
755407600f
3 changed files with 23 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue