(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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47164
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
/* 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. */
/* Set the per-function data. */
-void
+static void
mmix_init_machine_status (f)
struct function *f;
{
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." },
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
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;
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))
%{!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, \
} 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"
/* 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