Browse Source

* as.c: Replace CONST with const.

* write.c: Likewise.
	* config/obj-coff.c: Likewise.
	* config/tc-a29k.c: Likewise.
	* config/tc-arm.c: Likewise.
	* config/tc-dlx.c: Likewise.
	* config/tc-h8300.c: Likewise.
	* config/tc-h8500.c: Likewise.
	* config/tc-i370.c: Likewise.
	* config/tc-i860.c: Likewise.
	* config/tc-i960.c: Likewise.
	* config/tc-m68hc11.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-m88k.c: Likewise.
	* config/tc-mcore.c: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-ns32k.c: Likewise.
	* config/tc-pdp11.c: Likewise.
	* config/tc-pj.c: Likewise.
	* config/tc-s390.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-tahoe.c: Likewise.
	* config/tc-tic80.c: Likewise.
	* config/tc-v850.c: Likewise.
	* config/tc-vax.c: Likewise.
	* config/tc-w65.c: Likewise.
	* config/tc-z8k.c: Likewise.
binutils-2_13-branch
Alan Modra 25 years ago
parent
commit
5a38dc70b4
  1. 31
      gas/ChangeLog
  2. 2
      gas/as.c
  3. 4
      gas/config/obj-coff.c
  4. 4
      gas/config/tc-a29k.c
  5. 2
      gas/config/tc-arm.c
  6. 2
      gas/config/tc-dlx.c
  7. 2
      gas/config/tc-h8300.c
  8. 4
      gas/config/tc-h8500.c
  9. 8
      gas/config/tc-i370.c
  10. 6
      gas/config/tc-i860.c
  11. 4
      gas/config/tc-i960.c
  12. 4
      gas/config/tc-m68hc11.c
  13. 16
      gas/config/tc-m68k.c
  14. 4
      gas/config/tc-m88k.c
  15. 2
      gas/config/tc-mcore.c
  16. 6
      gas/config/tc-mips.c
  17. 4
      gas/config/tc-ns32k.c
  18. 28
      gas/config/tc-pdp11.c
  19. 4
      gas/config/tc-pj.c
  20. 2
      gas/config/tc-s390.c
  21. 2
      gas/config/tc-sh.c
  22. 6
      gas/config/tc-sparc.c
  23. 4
      gas/config/tc-tahoe.c
  24. 4
      gas/config/tc-tic80.c
  25. 2
      gas/config/tc-v850.c
  26. 6
      gas/config/tc-vax.c
  27. 6
      gas/config/tc-w65.c
  28. 2
      gas/config/tc-z8k.c
  29. 6
      gas/write.c

31
gas/ChangeLog

@ -1,3 +1,34 @@
2002-06-08 Alan Modra <amodra@bigpond.net.au>
* as.c: Replace CONST with const.
* write.c: Likewise.
* config/obj-coff.c: Likewise.
* config/tc-a29k.c: Likewise.
* config/tc-arm.c: Likewise.
* config/tc-dlx.c: Likewise.
* config/tc-h8300.c: Likewise.
* config/tc-h8500.c: Likewise.
* config/tc-i370.c: Likewise.
* config/tc-i860.c: Likewise.
* config/tc-i960.c: Likewise.
* config/tc-m68hc11.c: Likewise.
* config/tc-m68k.c: Likewise.
* config/tc-m88k.c: Likewise.
* config/tc-mcore.c: Likewise.
* config/tc-mips.c: Likewise.
* config/tc-ns32k.c: Likewise.
* config/tc-pdp11.c: Likewise.
* config/tc-pj.c: Likewise.
* config/tc-s390.c: Likewise.
* config/tc-sh.c: Likewise.
* config/tc-sparc.c: Likewise.
* config/tc-tahoe.c: Likewise.
* config/tc-tic80.c: Likewise.
* config/tc-v850.c: Likewise.
* config/tc-vax.c: Likewise.
* config/tc-w65.c: Likewise.
* config/tc-z8k.c: Likewise.
2002-06-08 Daniel Jacobowitz <drow@mvista.com>
Based on patch from Matt Green:

2
gas/as.c

@ -350,7 +350,7 @@ parse_args (pargc, pargv)
as if it were the argument of an option with character code 1. */
char *shortopts;
extern CONST char *md_shortopts;
extern const char *md_shortopts;
static const char std_shortopts[] = {
'-', 'J',
#ifndef WORKING_DOT_WORD

4
gas/config/obj-coff.c

@ -271,7 +271,7 @@ fetch_coff_debug_section ()
static segT debug_section;
if (!debug_section)
{
CONST asymbol *s;
const asymbol *s;
s = bfd_make_debug_symbol (stdoutput, (char *) 0, 0);
assert (s != 0);
debug_section = s->section;
@ -711,7 +711,7 @@ obj_coff_endef (ignore)
/* intentional fallthrough */
case C_FCN:
{
CONST char *name;
const char *name;
S_SET_SEGMENT (def_symbol_in_progress, text_section);
name = S_GET_NAME (def_symbol_in_progress);

4
gas/config/tc-a29k.c

@ -1,5 +1,5 @@
/* tc-a29k.c -- Assemble for the AMD 29000.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -1038,7 +1038,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
#endif /* OBJ_AOUT */
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

2
gas/config/tc-arm.c

@ -10546,7 +10546,7 @@ md_assemble (str)
*/
CONST char * md_shortopts = "m:k";
const char * md_shortopts = "m:k";
#ifdef ARM_BI_ENDIAN
#define OPTION_EB (OPTION_MD_BASE + 0)

2
gas/config/tc-dlx.c

@ -1239,7 +1239,7 @@ md_apply_fix3 (fixP, valP, seg)
return;
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] =
{

2
gas/config/tc-h8300.c

@ -1438,7 +1438,7 @@ md_atof (type, litP, sizeP)
return 0;
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

4
gas/config/tc-h8500.c

@ -1,5 +1,5 @@
/* tc-h8500.c -- Assemble code for the Hitachi H8/500
Copyright 1993, 1994, 1995, 1998, 2000, 2001
Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -1199,7 +1199,7 @@ md_atof (type, litP, sizeP)
return 0;
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

8
gas/config/tc-i370.c

@ -1,6 +1,6 @@
/* tc-i370.c -- Assembler for the IBM 360/370/390 instruction set.
Loosely based on the ppc files by Linas Vepstas <linas@linas.org> 1998, 99
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@ -430,9 +430,9 @@ const int md_long_jump_size = 4;
#endif
#ifdef OBJ_ELF
CONST char *md_shortopts = "l:um:K:VQ:";
const char *md_shortopts = "l:um:K:VQ:";
#else
CONST char *md_shortopts = "um:";
const char *md_shortopts = "um:";
#endif
struct option md_longopts[] =
{
@ -1419,7 +1419,7 @@ add_to_lit_pool (expressionS *exx, char *name, int sz)
static void
symbol_locate (symbolP, name, segment, valu, frag)
symbolS *symbolP;
CONST char *name; /* It is copied, the caller can modify */
const char *name; /* It is copied, the caller can modify */
segT segment; /* Segment identifier (SEG_<something>) */
valueT valu; /* Symbol value */
fragS *frag; /* Associated fragment */

6
gas/config/tc-i860.c

@ -1,5 +1,5 @@
/* tc-i860.c -- Assembler for the Intel i860 architecture.
Copyright 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
Copyright 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Brought back from the dead and completely reworked
@ -1013,9 +1013,9 @@ print_insn (insn)
#ifdef OBJ_ELF
CONST char *md_shortopts = "VQ:";
const char *md_shortopts = "VQ:";
#else
CONST char *md_shortopts = "";
const char *md_shortopts = "";
#endif
#define OPTION_EB (OPTION_MD_BASE + 0)

4
gas/config/tc-i960.c

@ -1,6 +1,6 @@
/* tc-i960.c - All the i80960-specific stuff
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001
1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS.
@ -912,7 +912,7 @@ md_number_to_field (instrP, val, bfixP)
****************************************************************************/
CONST char *md_shortopts = "A:b";
const char *md_shortopts = "A:b";
struct option md_longopts[] =
{
#define OPTION_LINKRELAX (OPTION_MD_BASE)

4
gas/config/tc-m68hc11.c

@ -1,5 +1,5 @@
/* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@worldnet.fr)
This file is part of GAS, the GNU Assembler.
@ -255,7 +255,7 @@ const pseudo_typeS md_pseudo_table[] = {
/* Options and initialization. */
CONST char *md_shortopts = "Sm:";
const char *md_shortopts = "Sm:";
struct option md_longopts[] = {
#define OPTION_FORCE_LONG_BRANCH (OPTION_MD_BASE)

16
gas/config/tc-m68k.c

@ -55,12 +55,12 @@ const char line_comment_chars[] = "#*";
const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
CONST char EXP_CHARS[] = "eE";
const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant, as
in "0f12.456" or "0d1.2345e12". */
CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
/* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be
changed in read.c . Ideally it shouldn't have to know about it at all,
@ -611,7 +611,7 @@ const pseudo_typeS md_pseudo_table[] =
extern void obj_coff_section PARAMS ((int));
#endif
CONST pseudo_typeS mote_pseudo_table[] =
const pseudo_typeS mote_pseudo_table[] =
{
{"dcl", cons, 4},
@ -4730,7 +4730,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
* Out: GNU LD relocation length code: 0, 1, or 2.
*/
static CONST unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
long r_symbolnum;
know (fixP->fx_addsy != NULL);
@ -4754,8 +4754,8 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
#endif /* OBJ_AOUT or OBJ_BOUT */
#ifndef WORKING_DOT_WORD
CONST int md_short_jump_size = 4;
CONST int md_long_jump_size = 6;
const int md_short_jump_size = 4;
const int md_long_jump_size = 6;
void
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
@ -6729,9 +6729,9 @@ s_mri_endw (ignore)
*/
#ifdef OBJ_ELF
CONST char *md_shortopts = "lSA:m:kQ:V";
const char *md_shortopts = "lSA:m:kQ:V";
#else
CONST char *md_shortopts = "lSA:m:k";
const char *md_shortopts = "lSA:m:k";
#endif
struct option md_longopts[] = {

4
gas/config/tc-m88k.c

@ -2,7 +2,7 @@
Contributed by Devon Bowen of Buffalo University
and Torbjorn Granlund of the Swedish Institute of Computer Science.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999,
2000, 2001
2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -207,7 +207,7 @@ md_begin ()
}
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

2
gas/config/tc-mcore.c

@ -1794,7 +1794,7 @@ md_atof (type, litP, sizeP)
return 0;
}
CONST char * md_shortopts = "";
const char * md_shortopts = "";
#define OPTION_JSRI2BSR_ON (OPTION_MD_BASE + 0)
#define OPTION_JSRI2BSR_OFF (OPTION_MD_BASE + 1)

6
gas/config/tc-mips.c

@ -3045,8 +3045,8 @@ macro_build_lui (place, counter, ep, regnum)
struct mips_cl_insn insn;
bfd_reloc_code_real_type r[3]
= {BFD_RELOC_UNUSED, BFD_RELOC_UNUSED, BFD_RELOC_UNUSED};
CONST char *name = "lui";
CONST char *fmt = "t,u";
const char *name = "lui";
const char *fmt = "t,u";
assert (! mips_opts.mips16);
@ -9832,7 +9832,7 @@ static int support_64bit_objects(void)
}
#endif /* OBJ_ELF */
CONST char *md_shortopts = "nO::g::G:";
const char *md_shortopts = "nO::g::G:";
struct option md_longopts[] =
{

4
gas/config/tc-ns32k.c

@ -1,6 +1,6 @@
/* ns32k.c -- Assemble on the National Semiconductor 32k series
Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001
2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -2125,7 +2125,7 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
md_number_to_disp (ptr + 1, (valueT) offset, 4);
}
CONST char *md_shortopts = "m:";
const char *md_shortopts = "m:";
struct option md_longopts[] =
{

28
gas/config/tc-pdp11.c

@ -75,25 +75,25 @@ int asm_option[ASM_OPT_NUM];
/* These chars start a comment anywhere in a source file (except inside
another comment */
CONST char comment_chars[] = "#/";
const char comment_chars[] = "#/";
/* These chars only start a comment at the beginning of a line. */
CONST char line_comment_chars[] = "#/";
const char line_comment_chars[] = "#/";
CONST char line_separator_chars[] = ";";
const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant from exp in floating point nums */
CONST char EXP_CHARS[] = "eE";
const char EXP_CHARS[] = "eE";
/* Chars that mean this number is a floating point constant */
/* as in 0f123.456 */
/* or 0H1.234E-12 (see exp chars above) */
CONST char FLT_CHARS[] = "dDfF";
const char FLT_CHARS[] = "dDfF";
void pseudo_even (int);
void pseudo_bss (int);
CONST pseudo_typeS md_pseudo_table[] =
const pseudo_typeS md_pseudo_table[] =
{
{ "bss", pseudo_bss, 0 },
{ "even", pseudo_even, 0 },
@ -617,7 +617,7 @@ void
md_assemble (instruction_string)
char *instruction_string;
{
CONST struct pdp11_opcode *op;
const struct pdp11_opcode *op;
struct pdp11_code insn, op1, op2;
int error;
int size;
@ -1019,8 +1019,8 @@ md_convert_frag (headers, seg, fragP)
{
}
CONST int md_short_jump_size = 2;
CONST int md_long_jump_size = 4;
const int md_short_jump_size = 2;
const int md_long_jump_size = 4;
void
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
@ -1289,7 +1289,7 @@ set_machine_model (arg)
return 0;
}
CONST char *md_shortopts = "m:";
const char *md_shortopts = "m:";
struct option md_longopts[] =
{
@ -1364,9 +1364,9 @@ enum
struct
{
CONST char *pattern;
const char *pattern;
int opt;
CONST char *description;
const char *description;
} options;
static struct options extension_opts[] =
@ -1433,7 +1433,7 @@ static struct options model_opts[] =
struct
{
CONST char *title;
const char *title;
struct options *opts;
int num;
} all_opts[] =
@ -1508,7 +1508,7 @@ parse_match (char *arg, char *pattern)
int
fprint_opt (stream, pattern)
FILE *stream;
CONST char *pattern;
const char *pattern;
{
int n;

4
gas/config/tc-pj.c

@ -1,6 +1,6 @@
/*-
tc-pj.c -- Assemble code for Pico Java
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -383,7 +383,7 @@ md_atof (type, litP, sizeP)
return NULL;
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {

2
gas/config/tc-s390.c

@ -312,7 +312,7 @@ const int md_short_jump_size = 4;
const int md_long_jump_size = 4;
#endif
CONST char *md_shortopts = "A:m:kVQ:";
const char *md_shortopts = "A:m:kVQ:";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

2
gas/config/tc-sh.c

@ -2601,7 +2601,7 @@ s_uses (ignore)
demand_empty_rest_of_line ();
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] =
{
#define OPTION_RELAX (OPTION_MD_BASE)

6
gas/config/tc-sparc.c

@ -395,12 +395,12 @@ sparc_target_format ()
*/
#ifdef OBJ_ELF
CONST char *md_shortopts = "A:K:VQ:sq";
const char *md_shortopts = "A:K:VQ:sq";
#else
#ifdef OBJ_AOUT
CONST char *md_shortopts = "A:k";
const char *md_shortopts = "A:k";
#else
CONST char *md_shortopts = "A:";
const char *md_shortopts = "A:";
#endif
#endif
struct option md_longopts[] = {

4
gas/config/tc-tahoe.c

@ -1,6 +1,6 @@
/* This file is tc-tahoe.c
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 2000, 2001
Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1995, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -386,7 +386,7 @@ md_begin ()
as_fatal (errorval);
}
CONST char *md_shortopts = "ad:STt:V";
const char *md_shortopts = "ad:STt:V";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};

4
gas/config/tc-tic80.c

@ -1,5 +1,5 @@
/* tc-tic80.c -- Assemble for the TI TMS320C80 (MV)
Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
Copyright 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -900,7 +900,7 @@ md_begin ()
/* The assembler adds md_shortopts to the string passed to getopt. */
CONST char *md_shortopts = "";
const char *md_shortopts = "";
/* The assembler adds md_longopts to the machine independent long options
that are passed to getopt. */

2
gas/config/tc-v850.c

@ -1086,7 +1086,7 @@ parse_register_list (insn, operand)
return NULL;
}
CONST char *md_shortopts = "m:";
const char *md_shortopts = "m:";
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}

6
gas/config/tc-vax.c

@ -1,5 +1,5 @@
/* tc-vax.c - vax-specific -
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1998, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -3097,9 +3097,9 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
}
#ifdef OBJ_VMS
CONST char *md_shortopts = "d:STt:V+1h:Hv::";
const char *md_shortopts = "d:STt:V+1h:Hv::";
#else
CONST char *md_shortopts = "d:STt:V";
const char *md_shortopts = "d:STt:V";
#endif
struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}

6
gas/config/tc-w65.c

@ -1,5 +1,5 @@
/* tc-w65.c -- Assemble code for the W65816
Copyright 1995, 1998, 2000, 2001 Free Software Foundation, Inc.
Copyright 1995, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -28,7 +28,7 @@
#include "../opcodes/w65-opc.h"
const char comment_chars[] = "!";
CONST char line_separator_chars[] = ";";
const char line_separator_chars[] = ";";
const char line_comment_chars[] = "!#";
/* This table describes all the machine specific pseudo-ops the assembler
@ -1186,7 +1186,7 @@ md_estimate_size_before_relax (fragP, segment_type)
return fragP->fr_var;
}
CONST char *md_shortopts = "";
const char *md_shortopts = "";
struct option md_longopts[] = {
#define OPTION_RELAX (OPTION_MD_BASE)
{NULL, no_argument, NULL, 0}

2
gas/config/tc-z8k.c

@ -1340,7 +1340,7 @@ md_atof (type, litP, sizeP)
return 0;
}
CONST char *md_shortopts = "z:";
const char *md_shortopts = "z:";
struct option md_longopts[] =
{

6
gas/write.c

@ -1,6 +1,6 @@
/* write.c - emit .o file
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001
1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -61,8 +61,8 @@
#endif
#ifndef WORKING_DOT_WORD
extern CONST int md_short_jump_size;
extern CONST int md_long_jump_size;
extern const int md_short_jump_size;
extern const int md_long_jump_size;
#endif
/* Used to control final evaluation of expressions. */

Loading…
Cancel
Save