+2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * config/tc-aarch64.c (struct aarch64_long_option_table): Ad const
+ qualifier.
+ * config/tc-alpha.c (md_parse_option): Likewise.
+ * config/tc-arc.c (md_parse_option): Likewise.
+ * config/tc-arm.c (struct arm_long_option_table): Likewise.
+ (md_parse_option): Likewise.
+ * config/tc-avr.c (md_parse_option): Likewise.
+ * config/tc-bfin.c (md_parse_option): Likewise.
+ * config/tc-cr16.c (md_parse_option): Likewise.
+ * config/tc-cris.c (s_cris_arch): Likewise.
+ (md_parse_option): Likewise.
+ * config/tc-crx.c (md_parse_option): Likewise.
+ * config/tc-d10v.c (md_parse_option): Likewise.
+ * config/tc-d30v.c (md_parse_option): Likewise.
+ * config/tc-dlx.c (md_parse_option): Likewise.
+ * config/tc-epiphany.c (md_parse_option): Likewise.
+ * config/tc-fr30.c (md_parse_option): Likewise.
+ * config/tc-frv.c (md_parse_option): Likewise.
+ * config/tc-ft32.c (md_parse_option): Likewise.
+ * config/tc-h8300.c (md_parse_option): Likewise.
+ * config/tc-hppa.c (md_parse_option): Likewise.
+ * config/tc-i370.c (md_parse_option): Likewise.
+ * config/tc-i386.c (md_parse_option): Likewise.
+ * config/tc-i860.c (md_parse_option): Likewise.
+ * config/tc-i960.c (md_parse_option): Likewise.
+ * config/tc-ia64.c (md_parse_option): Likewise.
+ * config/tc-ip2k.c (md_parse_option): Likewise.
+ * config/tc-iq2000.c (md_parse_option): Likewise.
+ * config/tc-lm32.c (md_parse_option): Likewise.
+ * config/tc-m32c.c (md_parse_option): Likewise.
+ * config/tc-m32r.c (md_parse_option): Likewise.
+ * config/tc-m68hc11.c (md_parse_option): Likewise.
+ * config/tc-m68k.c (md_parse_option): Likewise.
+ * config/tc-mcore.c (md_parse_option): Likewise.
+ * config/tc-mep.c (md_parse_option): Likewise.
+ * config/tc-metag.c (struct metag_long_option): Likewise.
+ (md_parse_option): Likewise.
+ * config/tc-microblaze.c (md_parse_option): Likewise.
+ * config/tc-microblaze.h (md_parse_option): Remove prototype.
+ * config/tc-mips.c (md_parse_option): Adjust.
+ * config/tc-mmix.c (md_parse_option): Likewise.
+ * config/tc-mn10200.c (md_parse_option): Likewise.
+ * config/tc-mn10300.c (md_parse_option): Likewise.
+ * config/tc-moxie.c (md_parse_option): Likewise.
+ * config/tc-msp430.c (md_parse_option): Likewise.
+ * config/tc-mt.c (md_parse_option): Likewise.
+ * config/tc-nds32.c (md_parse_option): Likewise.
+ * config/tc-nds32.h (nds32_parse_option): Likewise.
+ * config/tc-nios2.c (md_parse_option): Likewise.
+ * config/tc-ns32k.c (md_parse_option): Likewise.
+ * config/tc-or1k.c (md_parse_option): Likewise.
+ * config/tc-pdp11.c (md_parse_option): Likewise.
+ * config/tc-pj.c (md_parse_option): Likewise.
+ * config/tc-ppc.c (md_parse_option): Likewise.
+ * config/tc-rl78.c (md_parse_option): Likewise.
+ * config/tc-rx.c (md_parse_option): Likewise.
+ * config/tc-s390.c (s390_parse_cpu): Likewise.
+ * config/tc-score.c (md_parse_option): Likewise.
+ * config/tc-sh.c (md_parse_option): Likewise.
+ * config/tc-sparc.c (md_parse_option): Likewise.
+ * config/tc-spu.c (md_parse_option): Likewise.
+ * config/tc-tic30.c (md_parse_option): Likewise.
+ * config/tc-tic4x.c (md_parse_option): Likewise.
+ * config/tc-tic54x.c (md_parse_option): Likewise.
+ * config/tc-tic6x.c (md_parse_option): Likewise.
+ * config/tc-tilegx.c (md_parse_option): Likewise.
+ * config/tc-tilepro.c (md_parse_option): Likewise.
+ * config/tc-v850.c (md_parse_option): Likewise.
+ * config/tc-vax.c (md_parse_option): Likewise.
+ * config/tc-visium.c (struct visium_long_option_table): Likewise.
+ * config/tc-xc16x.c (md_parse_option): Likewise.
+ * config/tc-xgate.c (md_parse_option): Likewise.
+ * config/tc-xstormy16.c (md_parse_option): Likewise.
+ * config/tc-xtensa.c (md_parse_option): Likewise.
+ * config/tc-z80.c (md_parse_option): Likewise.
+ * config/tc-z8k.c (md_parse_option): Likewise.
+ * tc.h (md_parse_option): Likewise.
+
2016-03-29 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-bfin.c (gencode): Use XOBNEW obstack_alloc () wrapper.
{
const char *option; /* Substring to match. */
const char *help; /* Help information. */
- int (*func) (char *subopt); /* Function to decode sub-option. */
+ int (*func) (const char *subopt); /* Function to decode sub-option. */
char *deprecated; /* If non-null, print this message. */
};
}
static int
-aarch64_parse_cpu (char *str)
+aarch64_parse_cpu (const char *str)
{
const struct aarch64_cpu_option_table *opt;
const char *ext = strchr (str, '+');
}
static int
-aarch64_parse_arch (char *str)
+aarch64_parse_arch (const char *str)
{
const struct aarch64_arch_option_table *opt;
const char *ext = strchr (str, '+');
};
static int
-aarch64_parse_abi (char *str)
+aarch64_parse_abi (const char *str)
{
const struct aarch64_option_abi_value_table *opt;
size_t optlen = strlen (str);
};
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
struct aarch64_option_table *opt;
struct aarch64_long_option_table *lopt;
/* Take care of the target-specific command-line options. */
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
arc700, av2em, av2hs. */
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
{
const char * option; /* Substring to match. */
const char * help; /* Help information. */
- int (* func) (char * subopt); /* Function to decode sub-option. */
+ int (* func) (const char * subopt); /* Function to decode sub-option. */
const char * deprecated; /* If non-null, print this message. */
};
}
static bfd_boolean
-arm_parse_cpu (char *str)
+arm_parse_cpu (const char *str)
{
const struct arm_cpu_option_table *opt;
const char *ext = strchr (str, '+');
}
static bfd_boolean
-arm_parse_arch (char *str)
+arm_parse_arch (const char *str)
{
const struct arm_arch_option_table *opt;
const char *ext = strchr (str, '+');
}
static bfd_boolean
-arm_parse_fpu (char * str)
+arm_parse_fpu (const char * str)
{
const struct arm_option_fpu_value_table * opt;
}
static bfd_boolean
-arm_parse_float_abi (char * str)
+arm_parse_float_abi (const char * str)
{
const struct arm_option_value_table * opt;
#ifdef OBJ_ELF
static bfd_boolean
-arm_parse_eabi (char * str)
+arm_parse_eabi (const char * str)
{
const struct arm_option_value_table *opt;
#endif
static bfd_boolean
-arm_parse_it_mode (char * str)
+arm_parse_it_mode (const char * str)
{
bfd_boolean ret = TRUE;
}
static bfd_boolean
-arm_ccs_mode (char * unused ATTRIBUTE_UNUSED)
+arm_ccs_mode (const char * unused ATTRIBUTE_UNUSED)
{
codecomposer_syntax = TRUE;
arm_comment_chars[0] = ';';
};
int
-md_parse_option (int c, char * arg)
+md_parse_option (int c, const char * arg)
{
struct arm_option_table *opt;
const struct arm_legacy_option_table *fopt;
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
{
char *t = s;
- char *arg1 = arg;
+ const char *arg1 = arg;
do
*t = TOLOWER (*arg1++);
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
GAS does not understand. */
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
arch_cris_any_v0_v10, arch_crisv32, arch_cris_common_v10_v32
};
-static enum cris_archs cris_arch_from_string (char **);
+static enum cris_archs cris_arch_from_string (const char **);
static int cris_insn_ver_valid_for_arch (enum cris_insn_version_usage,
enum cris_archs);
GAS does not understand. */
int
-md_parse_option (int arg, char *argp ATTRIBUTE_UNUSED)
+md_parse_option (int arg, const char *argp ATTRIBUTE_UNUSED)
{
switch (arg)
{
case OPTION_ARCH:
{
- char *str = argp;
+ const char *str = argp;
enum cris_archs argarch = cris_arch_from_string (&str);
if (argarch == arch_cris_unknown)
arch_cris_unknown is returned. */
static enum cris_archs
-cris_arch_from_string (char **str)
+cris_arch_from_string (const char **str)
{
static const struct cris_arch_struct
{
would be more useful than confusing, implementation-wise and
user-wise. */
- char *str = input_line_pointer;
+ const char *str = input_line_pointer;
enum cris_archs arch = cris_arch_from_string (&str);
if (arch == arch_cris_unknown)
else if (arch != cris_arch)
as_bad (_(".arch <arch> requires a matching --march=... option"));
- input_line_pointer = str;
+ input_line_pointer = (char *) str;
demand_empty_rest_of_line ();
return;
}
GAS does not understand. */
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
}
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
}
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char *arg ATTRIBUTE_UNUSED)
+ const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
const char * md_shortopts = "";
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
{
return 0; /* No target-specific options. */
}
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char *arg ATTRIBUTE_UNUSED)
+ const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
static int g_switch_value = 8;
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
case OPTION_CPU:
{
- char *p;
+ const char *p;
int cpu_flags = EF_FRV_CPU_GENERIC;
/* Identify the processor type */
/* We have no target specific options yet, so these next
two functions are empty. */
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
};
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
unsigned int i;
switch (c)
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
unsigned int j;
char *arch, *next;
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
};
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
case 'A':
{
const struct tabentry *tp;
- char *p = arg;
+ const char *p = arg;
for (tp = arch_tab; tp->flag != NULL; tp++)
if (!strcmp (p, tp->flag))
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
const char * md_shortopts = "";
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char * arg ATTRIBUTE_UNUSED)
+ const char * arg ATTRIBUTE_UNUSED)
{
return 0;
}
/* Parse command line options. */
int
-md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
static void s_bss (int);
int
-md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
}
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
get_default_target ();
switch (c)
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char * arg)
+md_parse_option (int c, const char * arg)
{
switch (c)
{
static int optbitset = 0;
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
int i, idx;
switch (c)
/* Parse a CPU command line option. */
static int
-metag_parse_cpu (char * str)
+metag_parse_cpu (const char * str)
{
const struct metag_core_option * opt;
int optlen;
/* Parse an FPU command line option. */
static int
-metag_parse_fpu (char * str)
+metag_parse_fpu (const char * str)
{
const struct metag_core_option * opt;
int optlen;
/* Parse a DSP command line option. */
static int
-metag_parse_dsp (char * str)
+metag_parse_dsp (const char * str)
{
const struct metag_core_option * opt;
int optlen;
{
const char * option; /* Substring to match. */
const char * help; /* Help information. */
- int (* func) (char * subopt); /* Function to decode sub-option. */
+ int (* func) (const char * subopt); /* Function to decode sub-option. */
const char * deprecated; /* If non-null, print this message. */
};
};
int
-md_parse_option (int c, char * arg)
+md_parse_option (int c, const char * arg)
{
struct metag_long_option *lopt;
}
int
-md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
extern void md_assemble (char *);
extern symbolS * md_undefined_symbol (char *);
extern char * md_atof (int, char *, int *);
-extern int md_parse_option (int, char *);
extern void md_show_usage (FILE *);
extern void md_convert_frag (bfd *, segT, fragS *);
extern void md_operand (expressionS *);
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
unsigned int i;
/* Handle MMIX-specific option. */
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char *arg ATTRIBUTE_UNUSED)
+ const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
}
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
const char *md_shortopts = "";
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
};
int
-md_parse_option (int c, char * arg)
+md_parse_option (int c, const char * arg)
{
switch (c)
{
static enum mt_architectures mt_arch = ms1_16_002;
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char * arg)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg)
{
switch (c)
{
recognized. This will be handled by the generic code. */
int
-nds32_parse_option (int c, char *arg)
+nds32_parse_option (int c, const char *arg)
{
struct nds32_parse_option_table *coarse_tune;
struct nds32_set_option_table *fine_tune;
/* as.c. */
/* Extend GAS command line option handling capability. */
-extern int nds32_parse_option (int, char *);
+extern int nds32_parse_option (int, const char *);
extern void nds32_after_parse_args (void);
/* The endianness of the target format may change based on command
line arguments. */
/* The following functions are called by machine-independent parts of
the assembler. */
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
unsigned long or1k_machine = 0; /* default */
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
{
return 0;
}
static struct hash_control *insn_hash = NULL;
\f
static int
-set_option (char *arg)
+set_option (const char *arg)
{
int yes = 1;
}
static int
-set_cpu_model (char *arg)
+set_cpu_model (const char *arg)
{
char buf[4];
char *model = buf;
}
static int
-set_machine_model (char *arg)
+set_machine_model (const char *arg)
{
if (strncmp (arg, "pdp-11/", 7) != 0
&& strncmp (arg, "pdp11/", 6) != 0
See if it's a processor-specific option. */
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
init_defaults ();
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
const size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
ppc_cpu_t new_cpu;
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
};
int
-md_parse_option (int c ATTRIBUTE_UNUSED, char * arg ATTRIBUTE_UNUSED)
+md_parse_option (int c ATTRIBUTE_UNUSED, const char * arg ATTRIBUTE_UNUSED)
{
switch (c)
{
In case of an error, S390_OPCODE_MAXCPU is returned. */
static unsigned int
-s390_parse_cpu (char * arg,
+s390_parse_cpu (const char * arg,
unsigned int * ret_flags,
bfd_boolean allow_extensions)
{
ilp_bak = input_line_pointer;
if (icpu != S390_OPCODE_MAXCPU)
{
- input_line_pointer = arg;
+ input_line_pointer = (char *) arg;
*ret_flags = (cpu_table[icpu].flags & S390_INSTR_FLAG_FACILITY_MASK);
while (*input_line_pointer == '+' && allow_extensions)
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
/* We don't get a chance to initialize anything before we're called,
so handle that now. */
static int use_dd2 = 1;
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char *arg ATTRIBUTE_UNUSED)
+ const char *arg ATTRIBUTE_UNUSED)
{
debug ("In md_parse_option()\n");
return 0;
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
};
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
break;
case OPTION_STDERR_TO_FILE:
{
- char *filename = arg;
+ const char *filename = arg;
FILE *fp = fopen (filename, "w+");
if (fp == NULL)
/* Parse a target-specific option. */
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED)
{
switch (c)
{
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
if (c != 'm')
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
{
const char *option; /* Substring to match. */
const char *help; /* Help information. */
- int (*func) (char *subopt); /* Function to decode sub-option. */
+ int (*func) (const char *subopt); /* Function to decode sub-option. */
const char *deprecated; /* If non-null, print this message. */
};
static int
-visium_parse_arch (char *str)
+visium_parse_arch (const char *str)
{
struct visium_arch_option_table *opt;
};
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
struct visium_option_table *opt;
struct visium_long_option_table *lopt;
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char *arg ATTRIBUTE_UNUSED)
+ const char *arg ATTRIBUTE_UNUSED)
{
return 0;
}
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
int
md_parse_option (int c ATTRIBUTE_UNUSED,
- char * arg ATTRIBUTE_UNUSED)
+ const char * arg ATTRIBUTE_UNUSED)
{
return 0;
}
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
case option_target_hardware:
{
int earliest, latest = 0;
+ char *end;
if (*arg == 0 || *arg == '-')
as_fatal (_("invalid target hardware version"));
- earliest = strtol (arg, &arg, 0);
+ earliest = strtol (arg, &end, 0);
- if (*arg == 0)
+ if (*end == 0)
latest = earliest;
- else if (*arg == '-')
+ else if (*end == '-')
{
- if (*++arg == 0)
+ if (*++end == 0)
as_fatal (_("invalid target hardware version"));
- latest = strtol (arg, &arg, 0);
+ latest = strtol (end, &end, 0);
}
- if (*arg != 0)
+ if (*end != 0)
as_fatal (_("invalid target hardware version"));
xtensa_setup_hw_workarounds (earliest, latest);
case option_auto_litpool_limit:
{
int value = 0;
+ char *end;
if (auto_litpool_limit < 0)
as_fatal (_("no-auto-litpools is incompatible with auto-litpool-limit"));
if (*arg == 0 || *arg == '-')
as_fatal (_("invalid auto-litpool-limit argument"));
- value = strtol (arg, &arg, 10);
- if (*arg != 0)
+ value = strtol (arg, &end, 10);
+ if (*end != 0)
as_fatal (_("invalid auto-litpool-limit argument"));
if (value < 100 || value > 10000)
as_fatal (_("invalid auto-litpool-limit argument (range is 100-10000)"));
static int ins_used = INS_Z80;
int
-md_parse_option (int c, char* arg ATTRIBUTE_UNUSED)
+md_parse_option (int c, const char* arg ATTRIBUTE_UNUSED)
{
switch (c)
{
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (int c, char *arg)
+md_parse_option (int c, const char *arg)
{
switch (c)
{
extern const pseudo_typeS md_pseudo_table[];
char * md_atof (int, char *, int *);
-int md_parse_option (int, char *);
+int md_parse_option (int, const char *);
void md_show_usage (FILE *);
void md_assemble (char *);
void md_begin (void);