aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-hppa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-04-01 22:37:50 +1030
committerAlan Modra <amodra@gmail.com>2016-04-01 23:10:50 +1030
commit6d4af3c269e64b0093b23bd63d302bd9f90de6a9 (patch)
tree922a90c98ed72905f613a9d9ab22649f54a74af1 /gas/config/tc-hppa.c
parentbedf24f29b7b7592db3cd0f7354f24e42f39fc15 (diff)
downloadfsf-binutils-gdb-6d4af3c269e64b0093b23bd63d302bd9f90de6a9.zip
fsf-binutils-gdb-6d4af3c269e64b0093b23bd63d302bd9f90de6a9.tar.gz
fsf-binutils-gdb-6d4af3c269e64b0093b23bd63d302bd9f90de6a9.tar.bz2
Constify more
* cgen.c (weak_operand_overflow_check): Return const char*. * messages.c (as_internal_value_out_of_range): Formatting. (as_warn_value_out_of_range): Consify prefix param. (as_bad_value_out_of_range): Likewise. * read.c (s_errwarn): Constify msg.. (s_float_space, float_cons): ..and err. * as.h (as_warn_value_out_of_range, as_bad_value_out_of_range, ieee_md_atof, vax_md_atof): Update prototypes. * tc.h (md_atof): Update prototype. * config/atof-ieee.c (ieee_md_atof): Return const char*. * config/atof-vax.c (vax_md_atof): Likewise. * config/obj-elf.c (obj_elf_parse_section_letters): Constify bad_msg. * config/tc-aarch64.c (md_atof): Return const char*. * config/tc-alpha.c (s_alpha_section_name): Likewise. (s_alpha_comm): Constify sec_name. (section_name): Constify. (s_alpha_section): Consify name.. (alpha_elf_section_letter): ..and ptr_msg param.. (md_atof): ..and return. * config/tc-alpha.h (alpha_elf_section_letter): Update prototype. * config/tc-arc.c (md_atof): Return const char*. * config/tc-arm.c (md_atof): Likewise. * config/tc-avr.c (md_atof): Likewise. * config/tc-bfin.c (md_atof): Likewise. * config/tc-cr16.c (md_atof): Likewise. * config/tc-cris.c (md_atof): Likewise. * config/tc-crx.c (md_atof): Likewise. * config/tc-d10v.c (md_atof): Likewise. * config/tc-d30v.c (md_atof): Likewise. * config/tc-dlx.c (md_atof): Likewise. * config/tc-epiphany.c (md_atof): Likewise. * config/tc-fr30.c (md_atof): Likewise. * config/tc-frv.c (md_atof): Likewise. * config/tc-ft32.c (md_atof): Likewise. * config/tc-h8300.c (md_atof): Likewise. * config/tc-hppa.c (struct default_subspace_dict): Constify name. (struct default_space_dict): Likewise. (create_new_space): Constify name param. (create_new_subspace): Likewise. (is_defined_space, is_defined_subspace): Likewise. (pa_parse_space_stmt): Constify space_name param. (md_atof): Return const char*. (pa_spaces_begin): Constify name. * config/tc-i370.c (md_atof): Return const char*. * config/tc-i386.c (md_atof): Likewise. (x86_64_section_letter): Constify ptr_msg param. * config/tc-i386.h (x86_64_section_letter): Update prototype. * config/tc-i860.c (struct i860_it): Constify error. (md_atof): Return const char*. * config/tc-i960.c (md_atof): Likewise. * config/tc-ia64.c (md_atof): Likewise. (ia64_elf_section_letter): Constify ptr_msg param. * config/tc-ia64.h (ia64_elf_section_letter): Update prototype. * config/tc-ip2k.c (md_atof): Return const char*. * config/tc-iq2000.c (md_atof): Likewise. * config/tc-lm32.c (md_atof): Likewise. * config/tc-m32c.c (md_atof): Likewise. * config/tc-m32r.c (md_atof): Likewise. * config/tc-m68hc11.c (md_atof): Likewise. * config/tc-m68k.c (md_atof): Likewise. * config/tc-mcore.c (md_atof): Likewise. * config/tc-mep.c (md_atof): Likewise. (mep_elf_section_letter): Constify ptr_msg param. * config/tc-mep.h (mep_elf_section_letter): Update prototype. * config/tc-metag.c (md_atof): Return const char*. * config/tc-microblaze.c (md_atof): Likewise. * config/tc-microblaze.h (md_atof): Delete prototype. * config/tc-mips.c (mips_parse_argument_token): Constify err. (md_atof): Return const char*. * config/tc-mmix.c (md_atof): Likewise. * config/tc-mn10200.c (md_atof): Likewise. * config/tc-mn10300.c (md_atof): Likewise. * config/tc-moxie.c (md_atof): Likewise. * config/tc-msp430.c (md_atof): Likewise. * config/tc-mt.c (md_atof): Likewise. * config/tc-nds32.c (md_atof): Likewise. * config/tc-nios2.c (md_atof): Likewise. (nios2_elf_section_letter): Constify ptr_msg param. * config/tc-nios2.h (nios2_elf_section_letter): Update prototype. * config/tc-ns32k.c (md_atof): Return const char*. * config/tc-or1k.c (md_atof): Likewise. * config/tc-pdp11.c (struct pdp11_code): Constify error. (md_atof): Return const char*. * config/tc-pj.c (md_atof): Likewise. * config/tc-ppc.c (md_atof): Likewise. * config/tc-rl78.c (md_atof): Likewise. * config/tc-rx.c (md_atof): Likewise. * config/tc-s390.c (md_atof): Likewise. * config/tc-score.c (s3_atof, md_atof): Likewise. * config/tc-sh.c (md_atof): Likewise. * config/tc-sparc.c (struct sparc_it): Constify error. (md_atof): Return const char*. * config/tc-spu.c (md_atof): Likewise. * config/tc-tic30.c (md_atof): Likewise. * config/tc-tic4x.c (md_atof): Likewise. * config/tc-tic54x.c (md_atof): Likewise. * config/tc-tic6x.c (md_atof): Likewise. * config/tc-tilegx.c (md_atof): Likewise. * config/tc-tilepro.c (md_atof): Likewise. * config/tc-v850.c (parse_register_list, md_atof): Likewise. * config/tc-vax.c (md_atof): Likewise. * config/tc-visium.c (md_atof): Likewise. * config/tc-xc16x.c (md_atof): Likewise. * config/tc-xgate.c (md_atof): Likewise. * config/tc-xstormy16.c (md_atof): Likewise. * config/tc-xtensa.c (md_atof): Likewise. * config/tc-z80.c (md_atof): Likewise. * config/tc-z8k.c (md_atof): Likewise.
Diffstat (limited to 'gas/config/tc-hppa.c')
-rw-r--r--gas/config/tc-hppa.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index c2001bd..82d33c2 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -350,7 +350,7 @@ typedef struct space_dictionary_chain sd_chain_struct;
struct default_subspace_dict
{
/* Name of the subspace. */
- char *name;
+ const char *name;
/* FIXME. Is this still needed? */
char defined;
@@ -403,7 +403,7 @@ struct default_subspace_dict
struct default_space_dict
{
/* Name of the space. */
- char *name;
+ const char *name;
/* Space number. It is possible to identify spaces within
assembly code numerically! */
@@ -503,27 +503,27 @@ static void pa_align (int);
static void pa_space (int);
static void pa_spnum (int);
static void pa_subspace (int);
-static sd_chain_struct *create_new_space (char *, int, int,
- int, int, int,
- asection *, int);
+static sd_chain_struct *create_new_space (const char *, int, int,
+ int, int, int,
+ asection *, int);
static ssd_chain_struct *create_new_subspace (sd_chain_struct *,
- char *, int, int,
- int, int, int, int,
- int, int, int, int,
- int, asection *);
+ const char *, int, int,
+ int, int, int, int,
+ int, int, int, int,
+ int, asection *);
static ssd_chain_struct *update_subspace (sd_chain_struct *,
- char *, int, int, int,
- int, int, int, int,
- int, int, int, int,
- asection *);
-static sd_chain_struct *is_defined_space (char *);
-static ssd_chain_struct *is_defined_subspace (char *);
+ char *, int, int, int,
+ int, int, int, int,
+ int, int, int, int,
+ asection *);
+static sd_chain_struct *is_defined_space (const char *);
+static ssd_chain_struct *is_defined_subspace (const char *);
static sd_chain_struct *pa_segment_to_space (asection *);
static ssd_chain_struct *pa_subsegment_to_subspace (asection *,
subsegT);
static sd_chain_struct *pa_find_space_by_number (int);
static unsigned int pa_subspace_start (sd_chain_struct *, int);
-static sd_chain_struct *pa_parse_space_stmt (char *, int);
+static sd_chain_struct *pa_parse_space_stmt (const char *, int);
#endif
/* File and globally scoped variable declarations. */
@@ -1319,7 +1319,7 @@ pa_parse_nullif (char **s)
return nullif;
}
-char *
+const char *
md_atof (int type, char *litP, int *sizeP)
{
return ieee_md_atof (type, litP, sizeP, TRUE);
@@ -7080,7 +7080,7 @@ pa_check_current_space_and_subspace (void)
by the parameters to the .SPACE directive. */
static sd_chain_struct *
-pa_parse_space_stmt (char *space_name, int create_flag)
+pa_parse_space_stmt (const char *space_name, int create_flag)
{
char *name, *ptemp, c;
char loadable, defined, private, sort;
@@ -7590,7 +7590,7 @@ pa_spaces_begin (void)
i = 0;
while (pa_def_spaces[i].name)
{
- char *name;
+ const char *name;
/* Pick the right name to use for the new section. */
name = pa_def_spaces[i].name;
@@ -7606,7 +7606,7 @@ pa_spaces_begin (void)
i = 0;
while (pa_def_subspaces[i].name)
{
- char *name;
+ const char *name;
int applicable, subsegment;
asection *segment = NULL;
sd_chain_struct *space;
@@ -7707,7 +7707,7 @@ pa_spaces_begin (void)
by the given parameters. */
static sd_chain_struct *
-create_new_space (char *name,
+create_new_space (const char *name,
int spnum,
int loadable ATTRIBUTE_UNUSED,
int defined,
@@ -7789,7 +7789,7 @@ create_new_space (char *name,
static ssd_chain_struct *
create_new_subspace (sd_chain_struct *space,
- char *name,
+ const char *name,
int loadable ATTRIBUTE_UNUSED,
int code_only ATTRIBUTE_UNUSED,
int comdat,
@@ -7893,7 +7893,7 @@ update_subspace (sd_chain_struct *space,
NULL if no such space exists. */
static sd_chain_struct *
-is_defined_space (char *name)
+is_defined_space (const char *name)
{
sd_chain_struct *chain_pointer;
@@ -7942,7 +7942,7 @@ pa_segment_to_space (asection *seg)
own subspace. */
static ssd_chain_struct *
-is_defined_subspace (char *name)
+is_defined_subspace (const char *name)
{
sd_chain_struct *space_chain;
ssd_chain_struct *subspace_chain;