This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for warnings on various cross targets
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch for warnings on various cross targets
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sun, 21 Oct 2001 11:10:02 -0400 (EDT)
In getting to the point where we can realistically use -Werror during
bootstraps, I setup some infrastructure so I could easily build cross
compilers to lots of various targets and cleanup warnings on them.
The patch below zaps the following unique warnings:
< config/d30v/d30v.c:1827: warning: function declaration isn't a prototype
< config/d30v/d30v.c:2722: warning: initialization discards qualifiers from pointer target type
< config/d30v/d30v.c:2737: warning: assignment discards qualifiers from pointer target type
< config/d30v/d30v.c:2742: warning: assignment discards qualifiers from pointer target type
< config/d30v/d30v.c:3377: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3380: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3383: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3387: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3394: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3398: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3404: warning: return discards qualifiers from pointer target type
< config/d30v/d30v.c:3592: warning: implicit declaration of function `get_hard_reg_initial_val'
< config/d30v/d30v.c:3592: warning: return makes pointer from integer without a cast
< config/elfos.h:348:1: warning: this is the location of the previous definition
< config/fr30/fr30.c:714: warning: function declaration isn't a prototype
< config/fr30/fr30.c:735: warning: function declaration isn't a prototype
< config/i370/i370.c:416: warning: non-static declaration for `i370_label_scan' follows static
< config/i370/i370.c:595: warning: non-static declaration for `mvs_get_label' follows static
< config/i370/i370.c:707: warning: no previous prototype for `mvs_get_label_page'
< config/i960/i960.h:28:1: warning: this is the location of the previous definition
< config/i960/vx960-coff.h:24:1: warning: "MULTILIB_DEFAULTS" redefined
< config/m68hc11/m68hc11.c:1098: warning: initialization discards qualifiers from pointer target type
< config/m68hc11/m68hc11.c:4831: warning: implicit declaration of function `reload_cse_regs'
< config/mcore/mcore.h:1114:1: warning: "TARGET_ASM_NAMED_SECTION" redefined
< config/mn10200/mn10200.c:1033: warning: comma at end of enumerator list
< config/mn10300/mn10300.c:1096: warning: return discards qualifiers from pointer target type
< config/mn10300/mn10300.c:1115: warning: return discards qualifiers from pointer target type
< config/mn10300/mn10300.c:1119: warning: return discards qualifiers from pointer target type
< config/pj/pj.c:1155: warning: function declaration isn't a prototype
< config/pj/pj.c:234: warning: function declaration isn't a prototype
< config/pj/pj.c:274: warning: function declaration isn't a prototype
< config/pj/pj.c:309: warning: function declaration isn't a prototype
< config/pj/pj.c:327: warning: function declaration isn't a prototype
< config/pj/pj.c:337: warning: function declaration isn't a prototype
< config/pj/pj.c:367: warning: function declaration isn't a prototype
< config/pj/pj.c:573: warning: non-static declaration for `pj_output_store_into_lval' follows static
< config/pj/pj.c:656: warning: function declaration isn't a prototype
< config/pj/pj.c:832: warning: traditional C rejects the unary plus operator
< config/pj/pj.c:881: warning: return discards qualifiers from pointer target type
< config/pj/pj.c:889: warning: return discards qualifiers from pointer target type
< config/pj/pj.c:892: warning: return discards qualifiers from pointer target type
< config/s390/s390.c:2165: warning: traditional C rejects string concatenation
< config/s390/s390.c:2490: warning: traditional C rejects automatic aggregate initialization
< config/s390/s390.c:2804: warning: traditional C rejects automatic aggregate initialization
< config/v850/v850-c.c:104: warning: `return' with a value, in function returning void
< config/v850/v850-c.c:96: warning: `return' with a value, in function returning void
< config/v850/v850.c:2842: warning: implicit declaration of function `get_hard_reg_initial_val'
< config/v850/v850.c:2842: warning: return makes pointer from integer without a cast
< config/vax/vax.c:832: warning: implicit declaration of function `const_section'
< cp/lex.c:1578: warning: function declaration isn't a prototype
< dwarf2asm.c:194: warning: unused parameter `label'
< dwarf2asm.c:194: warning: unused parameter `size'
< dwarf2asm.c:319: warning: pointer targets in passing arg 2 of `output_ascii' differ in signedness
< final.c:1799: warning: unused variable `tmp'
< final.c:1808:52: warning: the meaning of '\a' varies with -traditional
< final.c:1820:52: warning: the meaning of '\a' varies with -traditional
< final.c:2273: warning: empty body in an if-statement
< flow.c:4108: warning: unused variable `insn'
< gcc.c:2905: warning: function declaration isn't a prototype
< gcc.c:2906: warning: unused parameter `do_exe'
< gcc.c:2908: warning: unused variable `i'
< insn-emit.c:1033: warning: function declaration isn't a prototype
< insn-emit.c:1069: warning: function declaration isn't a prototype
< insn-emit.c:1869: warning: function declaration isn't a prototype
< insn-emit.c:1929: warning: function declaration isn't a prototype
< insn-emit.c:2192: warning: unused variable `label'
< insn-emit.c:5292: warning: traditional C rejects the 'u' suffix
< insn-emit.c:997: warning: function declaration isn't a prototype
< insn-output.c:109: warning: assignment discards qualifiers from pointer target type
< insn-output.c:111: warning: assignment discards qualifiers from pointer target type
< insn-output.c:118: warning: control reaches end of non-void function
< insn-output.c:148: warning: control reaches end of non-void function
< insn-output.c:176: warning: assignment discards qualifiers from pointer target type
< insn-output.c:180: warning: control reaches end of non-void function
< insn-output.c:210: warning: control reaches end of non-void function
< insn-output.c:213: warning: assignment discards qualifiers from pointer target type
< insn-output.c:234: warning: control reaches end of non-void function
< insn-output.c:243: warning: assignment discards qualifiers from pointer target type
< insn-output.c:256: warning: control reaches end of non-void function
< insn-output.c:298: warning: control reaches end of non-void function
< insn-output.c:315: warning: unused variable `ops'
< insn-output.c:320: warning: control reaches end of non-void function
< insn-output.c:321: warning: function declaration isn't a prototype
< insn-output.c:3361: warning: suggest parentheses around comparison in operand of &
< insn-output.c:371: warning: control reaches end of non-void function
< insn-output.c:398: warning: assignment discards qualifiers from pointer target type
< insn-output.c:399: warning: assignment discards qualifiers from pointer target type
< insn-output.c:399: warning: control reaches end of non-void function
< insn-output.c:400: warning: assignment discards qualifiers from pointer target type
< insn-output.c:401: warning: assignment discards qualifiers from pointer target type
< insn-output.c:402: warning: assignment discards qualifiers from pointer target type
< insn-output.c:403: warning: assignment discards qualifiers from pointer target type
< insn-output.c:429: warning: control reaches end of non-void function
< insn-output.c:437: warning: assignment discards qualifiers from pointer target type
< insn-output.c:438: warning: assignment discards qualifiers from pointer target type
< insn-output.c:439: warning: assignment discards qualifiers from pointer target type
< insn-output.c:440: warning: assignment discards qualifiers from pointer target type
< insn-output.c:441: warning: assignment discards qualifiers from pointer target type
< insn-output.c:442: warning: assignment discards qualifiers from pointer target type
< insn-output.c:457: warning: control reaches end of non-void function
< insn-output.c:56: warning: control reaches end of non-void function
< insn-output.c:840: warning: control reaches end of non-void function
< insn-output.c:86: warning: control reaches end of non-void function
< insn-output.c:878: warning: assignment discards qualifiers from pointer target type
< insn-output.c:879: warning: assignment discards qualifiers from pointer target type
< insn-output.c:880: warning: assignment discards qualifiers from pointer target type
< insn-output.c:881: warning: assignment discards qualifiers from pointer target type
< insn-output.c:886: warning: assignment discards qualifiers from pointer target type
< insn-output.c:887: warning: assignment discards qualifiers from pointer target type
< insn-output.c:888: warning: assignment discards qualifiers from pointer target type
< insn-output.c:889: warning: assignment discards qualifiers from pointer target type
< local-alloc.c:2440: warning: array subscript has type `char'
< recog.c:1806: warning: array subscript has type `char'
< recog.c:2945: warning: array subscript has type `char'
< stmt.c:1439: warning: array subscript has type `char'
< stmt.c:1754: warning: array subscript has type `char'
< tlink.c:498: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type
< tlink.c:499: warning: passing arg 1 of `putenv' discards qualifiers from pointer target type
< toplev.c:2247: warning: assignment discards qualifiers from pointer target type
< toplev.c:2247: warning: initialization discards qualifiers from pointer target type
< toplev.c:2247: warning: passing arg 2 of `m68hc11_asm_file_start' discards qualifiers from pointer target type
< varasm.c:1231: warning: assignment discards qualifiers from pointer target type
< varasm.c:1354: warning: pointer targets in passing arg 2 of `output_ascii' differ in signedness
< varasm.c:1846: warning: assignment discards qualifiers from pointer target type
< varasm.c:2026: warning: unsigned int format, different type arg (arg 4)
< varasm.c:2109: warning: unsigned int format, long int arg (arg 3)
< varasm.c:2114: warning: unsigned int format, long int arg (arg 3)
< varasm.c:2114: warning: unsigned int format, long int arg (arg 5)
Tested by building cc1 in cross configurations from
sparc-sun-solaris2.7 to the following targets:
1750a-unknown-elf
a29k-unknown-rtems
alpha-dec-osf4.0
arc-unknown-elf
arm-unknown-pe
avr-unknown-elf
c38-convex-elf
c4x-unknown-rtems
clipper-intergraph-clix
cris-unknown-linux-gnu
d30v-unknown-elf
dsp16xx-unknown-elf
elxsi-elxsi-elf
fr30-unknown-elf
h8300-unknown-rtems
hppa1.1-hp-hpux11
i370-unknown-linux-gnu
i386-dg-dgux
i686-pc-linux-gnu
i860-unknown-sysv4
i960-wrs-vxworks
ia64-unknown-linux-gnu
m32r-unknown-elf
m68hc11-unknown-elf
m68k-motorola-sysv
m88k-tektronix-sysv3
mcore-unknown-elf
mips-sgi-irix6.5
mn10200-unknown-elf
mn10300-unknown-elf
ns32k-tek6200-bsd
pdp11-unknown-bsd
pj-unknown-linux-gnu
powerpc-apple-darwin
romp-unknown-aos
rs6000-ibm-aix4.3.3.0
s390-unknown-linux-gnu
sh-unknown-rtems
sparc-sun-sunos4.1.4
stormy16-unknown-elf
v850-unknown-rtems
vax-dec-vms
we32k-att-sysv
Of the above, only the dgux target doesn't build at the moment. I
have a posted patch for that awaiting review. Everything else builds
at least cc1.
I chose the targets so as to test as many of the .md and .c files in
the config directory as I could. If anyone has better suggestions
to replace any of the above feel free to let me know which (and why.)
Even though most of the changes are in the config directory, I also
did a full three-stage on solaris2.7 and it passed.
NOTE, the only bit I wasn't sure about was a change to some assembly
syntax in clipper.h (ASM_OUTPUT_REG_POP). It warned about \a, so I
got rid of the backslash since it seemed to be a typo.
Okay to install?
Thanks,
--Kaveh
2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 1750a.h (EXTRA_SECTION_FUNCTIONS): Add prototype.
(ASM_OUTPUT_ASCII): Avoid signed/unsigned warning.
* c4x.h (INIT_SECTION_FUNCTION): Add prototype.
(ASM_FILE_START): Const-ify.
(ASM_OUTPUT_BYTE_FLOAT, ASM_OUTPUT_SHORT_FLOAT): Fix format
specifier warning.
* c4x.md: Don't use 'U' integer suffix.
* clipper.h (ASM_OUTPUT_REG_POP): Fix typo.
* clipper.md (clipper_movstr): Delete declaration.
* d30v-protos.h (d30v_move_2words): Const-ify.
(debug_stack_info): Add prototype.
* d30v.c: Include "integrate.h".
(d30v_function_arg_boundary, d30v_function_arg,
d30v_function_arg_partial_nregs, d30v_function_arg_advance): Avoid
signed/unsigned warnings.
(d30v_print_operand_memory_reference, d30v_move_2words):
Const-ify.
* d30v.h (REG_CLASS_FROM_LETTER): Use unsigned array subscript.
* fr30.c (fr30_pass_by_reference, fr30_pass_by_value): Prototype.
* fr30.md: Const-ify.
* h8300.h (EXTRA_SECTION_FUNCTIONS): Add prototype.
* i370.c (i370_label_scan, mvs_get_label): Make definition static.
(mvs_get_label_page): Hide unused static function.
* i860.c (current_function_original_name): Const-ify.
* i860/sysv3.h (current_function_original_name): Likewise.
* i860/sysv4.h (current_function_original_name): Likewise.
* i960.md: Add default case in switches. Remove unused variable.
* i960/vx960-coff.h (MULTILIB_DEFAULTS): Undef before defining.
* m32r.md: Const-ify.
* m68hc11-protos.h (m68hc11_asm_file_start): Const-ify.
* m68hc11.c: Include "reload.h".
(static_chain_reg, print_options, m68hc11_asm_file_start):
Const-ify.
* m68hc11.md: Delete unused variable. Const-ify. Add parens
around & in comparison.
* mcore.h (TARGET_ASM_NAMED_SECTION): Undef before defining.
* mn10200.c (shift_mode): Remove trailing comma.
* mn10300-protos.h (output_tst): Const-ify.
* mn10300.c (output_tst): Likewise.
* pa/long_double.h (ASM_OUTPUT_LONG_DOUBLE): Fix format specifier
warnings.
* pa-protos.h (output_ascii): Use regular char *, not unsigned.
* pa.c (output_ascii): Likewise.
* pa/som.h (EXTRA_SECTION_FUNCTIONS): Add prototype.
* pdp11.md (expand_unop): Delete declarations.
* pj-protos.h (pj_output_addsi3): Const-ify.
* pj.c (pj_output_push_int, pj_output_load, pj_output_inc,
pj_output_cnv_op, mode_to_char, pj_output_varidx, pj_print_cond,
unique_src_operand): Add prototypes.
(pj_output_store_into_lval): Make definition static.
(pj_function_incoming_arg): Don't use unary plus.
(pj_output_addsi3): Const-ify.
* romp.md (get_symref): Delete declarations.
* s390/linux.h (ASM_OUTPUT_BYTE): Fix format specifier warnings.
(ASM_OUTPUT_ASCII): Const-ify. Fix signed/unsigned warning.
(ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
* s390.c (s390_final_chunkify): Don't use string concatenation.
(s390_function_prologue, s390_function_epilogue): Const-ify.
* s390.h (FUNCTION_PROFILER): Remove unused variable.
* v850-c.c (mark_current_function_as_interrupt): Don't return
value from void function.
* v850.c: Include "integrate.h".
* v850.h (ASM_OUTPUT_LABELREF): Const-ify.
* vax-protos.h (const_section): Add prototype.
* dwarf2asm.c (dw2_asm_output_pcrel): Mark parameters with
ATTRIBUTE_UNUSED.
* final.c (final_scan_insn): Add brackets around body of if-stmt.
* flow.c (clear_log_links): Remove unused variable.
* gcc.c (convert_filename): Add static prototype. Const-ify.
Wrap variable in macros controlling its use.
* output.h (sdata_section): Add prototype.
* tlink.c (recompile_files): Copy strings passed to `putenv'.
cp:
* lex.c (copy_lang_type): Add static prototype.
diff -rup orig/egcs-CVS20011020/gcc/config/1750a/1750a.h egcs-CVS20011020/gcc/config/1750a/1750a.h
--- orig/egcs-CVS20011020/gcc/config/1750a/1750a.h Fri Oct 19 15:33:30 2001
+++ egcs-CVS20011020/gcc/config/1750a/1750a.h Sat Oct 20 11:39:41 2001
@@ -917,6 +917,7 @@ enum reg_class { NO_REGS, R2, R0_1, INDE
#define EXTRA_SECTIONS in_readonly_data
#define EXTRA_SECTION_FUNCTIONS \
+ extern void const_section PARAMS ((void)); \
void const_section() \
{ \
fprintf(asm_out_file,"\tkonst\n"); \
@@ -1105,7 +1106,7 @@ enum reg_class { NO_REGS, R2, R0_1, INDE
if (label_pending) \
label_pending = 0; \
datalbl[datalbl_ndx].size += LEN; \
- for (i = 0; i < LEN; i++) { \
+ for (i = 0; i < (int) LEN; i++) { \
if ((i % 15) == 0) { \
if (i != 0) \
fprintf(FILE,"\n"); \
diff -rup orig/egcs-CVS20011020/gcc/config/c4x/c4x.h egcs-CVS20011020/gcc/config/c4x/c4x.h
--- orig/egcs-CVS20011020/gcc/config/c4x/c4x.h Thu Oct 18 07:31:29 2001
+++ egcs-CVS20011020/gcc/config/c4x/c4x.h Sat Oct 20 11:56:13 2001
@@ -1984,6 +1984,7 @@ if (REG_P (OP1) && ! REG_P (OP0)) \
FINI_SECTION_FUNCTION
#define INIT_SECTION_FUNCTION \
+extern void init_section PARAMS ((void)); \
void \
init_section () \
{ \
@@ -2096,8 +2097,8 @@ const_section () \
fprintf (FILE, "\t.file\t"); \
if (TARGET_TI) \
{ \
- char *p; \
- char *after_dir = main_input_filename; \
+ const char *p; \
+ const char *after_dir = main_input_filename; \
for (p = main_input_filename; *p; p++) \
if (*p == '/') \
after_dir = p + 1; \
@@ -2122,7 +2123,7 @@ const_section () \
REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
REAL_VALUE_TO_DECIMAL (VALUE, "%20lf", str); \
if (sizeof (int) == sizeof (long)) \
- fprintf (FILE, "\t.word\t0%08xh\t; %s\n", l, str);\
+ fprintf (FILE, "\t.word\t0%08xh\t; %s\n", (int) l, str);\
else \
fprintf (FILE, "\t.word\t0%08lxh\t; %s\n", l, str);\
} while (0);
@@ -2144,7 +2145,7 @@ const_section () \
l[1] = (l[0] << 8) | ((l[1] >> 24) & 0xff); \
if (sizeof (int) == sizeof (long)) \
fprintf (FILE, "\t.word\t0%08xh\t; %s\n\t.word\t0%08xh\n", \
- l[0], str, l[1]); \
+ (int) l[0], str, (int) l[1]); \
else \
fprintf (FILE, "\t.word\t0%08lxh\t; %s\n\t.word\t0%08lxh\n", \
l[0], str, l[1]); \
diff -rup orig/egcs-CVS20011020/gcc/config/c4x/c4x.md egcs-CVS20011020/gcc/config/c4x/c4x.md
--- orig/egcs-CVS20011020/gcc/config/c4x/c4x.md Fri Feb 2 20:34:27 2001
+++ egcs-CVS20011020/gcc/config/c4x/c4x.md Sat Oct 20 11:49:22 2001
@@ -5614,7 +5614,7 @@
(use (label_ref (match_operand 4 "" "")))]
""
"if (! TARGET_LOOP_UNSIGNED
- && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > (1U << 31))
+ && (unsigned HOST_WIDE_INT) INTVAL (operands[2]) > ((unsigned) 1 << 31))
FAIL;
if (INTVAL (operands[3]) > 1 || ! TARGET_RPTB)
{
diff -rup orig/egcs-CVS20011020/gcc/config/clipper/clipper.h egcs-CVS20011020/gcc/config/clipper/clipper.h
--- orig/egcs-CVS20011020/gcc/config/clipper/clipper.h Mon Jul 9 07:30:26 2001
+++ egcs-CVS20011020/gcc/config/clipper/clipper.h Sat Oct 20 12:12:19 2001
@@ -1020,7 +1020,7 @@ do \
It need not be very fast code. */
#define ASM_OUTPUT_REG_POP(FILE,REGNO) \
- fprintf (FILE, "\t%s (sp),%s\n\t\addq $8,sp\n", \
+ fprintf (FILE, "\t%s (sp),%s\n\taddq $8,sp\n", \
(REGNO) < 16 ? "loadw" : "loadd", reg_names[REGNO])
/* This is how to output an element of a case-vector that is absolute */
diff -rup orig/egcs-CVS20011020/gcc/config/clipper/clipper.md egcs-CVS20011020/gcc/config/clipper/clipper.md
--- orig/egcs-CVS20011020/gcc/config/clipper/clipper.md Wed Jul 4 15:38:06 2001
+++ egcs-CVS20011020/gcc/config/clipper/clipper.md Sat Oct 20 12:08:26 2001
@@ -555,7 +555,6 @@
""
"*
{
- extern void clipper_movstr ();
clipper_movstr (operands);
return \"\";
}"
diff -rup orig/egcs-CVS20011020/gcc/config/d30v/d30v-protos.h egcs-CVS20011020/gcc/config/d30v/d30v-protos.h
--- orig/egcs-CVS20011020/gcc/config/d30v/d30v-protos.h Sat Aug 18 16:30:25 2001
+++ egcs-CVS20011020/gcc/config/d30v/d30v-protos.h Sat Oct 20 12:19:16 2001
@@ -126,12 +126,13 @@ extern rtx d30v_legitimize_address PARAM
enum machine_mode, int));
extern int d30v_mode_dependent_address_p PARAMS ((rtx));
extern rtx d30v_emit_comparison PARAMS ((int, rtx, rtx, rtx));
-extern char *d30v_move_2words PARAMS ((rtx *, rtx));
+extern const char *d30v_move_2words PARAMS ((rtx *, rtx));
extern int d30v_emit_cond_move PARAMS ((rtx, rtx, rtx, rtx));
extern void d30v_machine_dependent_reorg PARAMS ((rtx));
extern rtx d30v_return_addr PARAMS ((void));
#endif
extern void d30v_init_expanders PARAMS ((void));
+extern void debug_stack_info PARAMS ((d30v_stack_t *));
/* External variables referenced */
diff -rup orig/egcs-CVS20011020/gcc/config/d30v/d30v.c egcs-CVS20011020/gcc/config/d30v/d30v.c
--- orig/egcs-CVS20011020/gcc/config/d30v/d30v.c Sun Oct 7 12:27:00 2001
+++ egcs-CVS20011020/gcc/config/d30v/d30v.c Sat Oct 20 12:23:11 2001
@@ -38,6 +38,7 @@
#include "except.h"
#include "function.h"
#include "toplev.h"
+#include "integrate.h"
#include "ggc.h"
#include "target.h"
#include "target-def.h"
@@ -1952,7 +1953,7 @@ d30v_function_arg_boundary (mode, type)
{
int size = ((mode == BLKmode && type)
? int_size_in_bytes (type)
- : GET_MODE_SIZE (mode));
+ : (int) GET_MODE_SIZE (mode));
return (size > UNITS_PER_WORD) ? 2*UNITS_PER_WORD : UNITS_PER_WORD;
}
@@ -1997,7 +1998,7 @@ d30v_function_arg (cum, mode, type, name
{
int size = ((mode == BLKmode && type)
? int_size_in_bytes (type)
- : GET_MODE_SIZE (mode));
+ : (int) GET_MODE_SIZE (mode));
int adjust = (size > UNITS_PER_WORD && (*cum & 1) != 0);
rtx ret;
@@ -2046,7 +2047,7 @@ d30v_function_arg_partial_nregs (cum, mo
{
int bytes = ((mode == BLKmode)
? int_size_in_bytes (type)
- : GET_MODE_SIZE (mode));
+ : (int) GET_MODE_SIZE (mode));
int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
int adjust = (bytes > UNITS_PER_WORD && (*cum & 1) != 0);
int arg_num = *cum + adjust;
@@ -2109,7 +2110,7 @@ d30v_function_arg_advance (cum, mode, ty
{
int bytes = ((mode == BLKmode)
? int_size_in_bytes (type)
- : GET_MODE_SIZE (mode));
+ : (int) GET_MODE_SIZE (mode));
int words = D30V_ALIGN (bytes, UNITS_PER_WORD) / UNITS_PER_WORD;
int adjust = (bytes > UNITS_PER_WORD && (*cum & 1) != 0);
@@ -2719,7 +2720,7 @@ d30v_print_operand_memory_reference (str
else
{
- char *suffix = "";
+ const char *suffix = "";
int offset0 = 0;
if (GET_CODE (x0) == SUBREG)
@@ -3366,7 +3367,7 @@ d30v_emit_comparison (test_int, result,
/* Return appropriate code to move 2 words. Since DImode registers must start
on even register numbers, there is no possibility of overlap. */
-char *
+const char *
d30v_move_2words (operands, insn)
rtx operands[];
rtx insn;
diff -rup orig/egcs-CVS20011020/gcc/config/d30v/d30v.h egcs-CVS20011020/gcc/config/d30v/d30v.h
--- orig/egcs-CVS20011020/gcc/config/d30v/d30v.h Fri Oct 19 19:17:58 2001
+++ egcs-CVS20011020/gcc/config/d30v/d30v.h Sat Oct 20 12:15:10 2001
@@ -1534,7 +1534,7 @@ extern enum reg_class regno_reg_class[];
'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */
extern enum reg_class reg_class_from_letter[];
-#define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter[ CHAR ]
+#define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter[(unsigned char)(CHAR)]
/* A C expression which is nonzero if register number NUM is suitable for use
as a base register in operand addresses. It may be either a suitable hard
diff -rup orig/egcs-CVS20011020/gcc/config/fr30/fr30.c egcs-CVS20011020/gcc/config/fr30/fr30.c
--- orig/egcs-CVS20011020/gcc/config/fr30/fr30.c Sun Jul 8 07:30:26 2001
+++ egcs-CVS20011020/gcc/config/fr30/fr30.c Sat Oct 20 12:34:14 2001
@@ -118,6 +118,9 @@ static struct fr30_frame_info current_f
/* Zero structure to initialize current_frame_info. */
static struct fr30_frame_info zero_frame_info;
+static rtx fr30_pass_by_reference PARAMS ((tree, tree));
+static rtx fr30_pass_by_value PARAMS ((tree, tree));
+
#define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
#define RETURN_POINTER_MASK (1 << (RETURN_POINTER_REGNUM))
diff -rup orig/egcs-CVS20011020/gcc/config/fr30/fr30.md egcs-CVS20011020/gcc/config/fr30/fr30.md
--- orig/egcs-CVS20011020/gcc/config/fr30/fr30.md Fri Jul 6 16:31:11 2001
+++ egcs-CVS20011020/gcc/config/fr30/fr30.md Sat Oct 20 12:32:07 2001
@@ -568,7 +568,7 @@
""
"*
{
- char * ldi_instr;
+ const char * ldi_instr;
const char * tmp_reg;
static char buffer[100];
REAL_VALUE_TYPE d;
@@ -1189,7 +1189,7 @@
{
static char buffer [100];
const char * tmp_reg;
- char * ldi_insn;
+ const char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
@@ -1243,7 +1243,7 @@
{
static char buffer [100];
const char * tmp_reg;
- char * ldi_insn;
+ const char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
@@ -1315,7 +1315,7 @@
{
static char buffer [100];
const char * tmp_reg;
- char * ldi_insn;
+ const char * ldi_insn;
tmp_reg = reg_names [COMPILER_SCRATCH_REGISTER];
diff -rup orig/egcs-CVS20011020/gcc/config/h8300/h8300.h egcs-CVS20011020/gcc/config/h8300/h8300.h
--- orig/egcs-CVS20011020/gcc/config/h8300/h8300.h Fri Sep 7 16:30:35 2001
+++ egcs-CVS20011020/gcc/config/h8300/h8300.h Sat Oct 20 12:38:37 2001
@@ -1113,6 +1113,7 @@ struct cum_arg
#define EXTRA_SECTIONS in_readonly_data
#define EXTRA_SECTION_FUNCTIONS \
+extern void readonly_data PARAMS ((void)); \
void \
readonly_data () \
{ \
diff -rup orig/egcs-CVS20011020/gcc/config/i370/i370.c egcs-CVS20011020/gcc/config/i370/i370.c
--- orig/egcs-CVS20011020/gcc/config/i370/i370.c Thu Oct 18 07:31:30 2001
+++ egcs-CVS20011020/gcc/config/i370/i370.c Sat Oct 20 12:56:09 2001
@@ -411,7 +411,7 @@ i370_short_branch (insn)
if (addr > lp -> label_last_ref) lp->label_last_ref = addr; \
}
-void
+static void
i370_label_scan ()
{
rtx insn;
@@ -590,7 +590,7 @@ check_label_emit ()
allocated from memory.
ID is the label number of the label being added to the list. */
-label_node_t *
+static label_node_t *
mvs_get_label (id)
int id;
{
@@ -702,6 +702,7 @@ mvs_check_label (id)
/* Get the page on which the label sits. This will be used to
determine is a register reload is really needed. */
+#if 0
int
mvs_get_label_page(int id)
{
@@ -714,6 +715,7 @@ mvs_get_label_page(int id)
}
return -1;
}
+#endif
/* The label list for the current page freed by linking the list onto the free
label element chain. */
diff -rup orig/egcs-CVS20011020/gcc/config/i860/i860.c egcs-CVS20011020/gcc/config/i860/i860.c
--- orig/egcs-CVS20011020/gcc/config/i860/i860.c Sun Jul 8 07:30:30 2001
+++ egcs-CVS20011020/gcc/config/i860/i860.c Sat Oct 20 13:11:01 2001
@@ -1663,7 +1663,7 @@ sfmode_constant_to_ulong (x)
extern char call_used_regs[];
-char *current_function_original_name;
+const char *current_function_original_name;
static int must_preserve_r1;
static unsigned must_preserve_bytes;
diff -rup orig/egcs-CVS20011020/gcc/config/i860/sysv3.h egcs-CVS20011020/gcc/config/i860/sysv3.h
--- orig/egcs-CVS20011020/gcc/config/i860/sysv3.h Fri Aug 10 16:30:23 2001
+++ egcs-CVS20011020/gcc/config/i860/sysv3.h Sat Oct 20 13:11:13 2001
@@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */
/* Output the special word the System V SDB wants to see just before
the first word of each function's prologue code. */
-extern char *current_function_original_name;
+extern const char *current_function_original_name;
/* This special macro is used to output a magic word just before the
first word of each function. On some versions of UNIX running on
diff -rup orig/egcs-CVS20011020/gcc/config/i860/sysv4.h egcs-CVS20011020/gcc/config/i860/sysv4.h
--- orig/egcs-CVS20011020/gcc/config/i860/sysv4.h Fri Aug 10 16:30:23 2001
+++ egcs-CVS20011020/gcc/config/i860/sysv4.h Sat Oct 20 13:11:21 2001
@@ -119,7 +119,7 @@ Boston, MA 02111-1307, USA. */
/* Output the special word the svr4 SDB wants to see just before
the first word of each function's prologue code. */
-extern char *current_function_original_name;
+extern const char *current_function_original_name;
/* This special macro is used to output a magic word just before the
first word of each function. On some versions of UNIX running on
diff -rup orig/egcs-CVS20011020/gcc/config/i960/i960.md egcs-CVS20011020/gcc/config/i960/i960.md
--- orig/egcs-CVS20011020/gcc/config/i960/i960.md Wed Aug 15 16:30:15 2001
+++ egcs-CVS20011020/gcc/config/i960/i960.md Sat Oct 20 13:22:21 2001
@@ -632,6 +632,8 @@
if (operands[1] == const0_rtx)
return \"st g14,%0\";
return \"st %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,address,load,store")
@@ -665,6 +667,8 @@
return \"ld %1,%0\";
case 3:
return \"st %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,address,load,store")
@@ -715,6 +719,8 @@
if (operands[1] == const0_rtx)
return \"stos g14,%0\";
return \"stos %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,misc,load,store")
@@ -749,6 +755,8 @@
return \"ldos %1,%0\";
case 3:
return \"stos %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,misc,load,store")
@@ -796,6 +804,8 @@
if (operands[1] == const0_rtx)
return \"stob g14,%0\";
return \"stob %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,misc,load,store")
@@ -830,6 +840,8 @@
return \"ldob %1,%0\";
case 3:
return \"stob %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,misc,load,store")
@@ -869,6 +881,8 @@
return i960_output_ldconst (operands[0], operands[1]);
case 5:
return i960_output_move_double_zero (operands[0]);
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,load,store,store")])
@@ -894,6 +908,8 @@
return i960_output_move_double (operands[0], operands[1]);
case 2:
return i960_output_ldconst (operands[0], operands[1]);
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,load,store")])
@@ -948,6 +964,8 @@
return i960_output_ldconst (operands[0], operands[1]);
case 5:
return i960_output_move_quad_zero (operands[0]);
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,load,store,store")])
@@ -973,6 +991,8 @@
return i960_output_move_quad (operands[0], operands[1]);
case 2:
return i960_output_ldconst (operands[0], operands[1]);
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,load,store")])
@@ -1085,6 +1105,8 @@
case 5:
operands[1] = adjust_address (operands[0], VOIDmode, 4);
return \"st g14,%0\;st g14,%1\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,fpload,fpstore,fpstore")])
@@ -1115,6 +1137,8 @@
return \"ldl %1,%0\";
case 4:
return \"stl %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,fpload,fpstore")])
@@ -1158,6 +1182,8 @@
if (operands[1] == CONST0_RTX (SFmode))
return \"st g14,%0\";
return \"st %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,fpload,fpstore")])
@@ -1188,6 +1214,8 @@
return \"ld %1,%0\";
case 4:
return \"st %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,fpload,fpstore")])
@@ -2099,6 +2127,8 @@
return \"ldt %1,%0\";
case 4:
return \"stt %1,%0\";
+ default:
+ abort();
}
}"
[(set_attr "type" "move,move,load,fpload,fpstore")])
@@ -2353,7 +2383,6 @@
rtx chain = operands[0];
rtx handler = operands[1];
rtx stack = operands[2];
- rtx label = operands[3];
/* We must restore the stack pointer, frame pointer, previous frame
pointer and the return instruction pointer. Since the ret
diff -rup orig/egcs-CVS20011020/gcc/config/i960/vx960-coff.h egcs-CVS20011020/gcc/config/i960/vx960-coff.h
--- orig/egcs-CVS20011020/gcc/config/i960/vx960-coff.h Thu Nov 2 18:29:10 2000
+++ egcs-CVS20011020/gcc/config/i960/vx960-coff.h Sat Oct 20 13:13:41 2001
@@ -21,6 +21,7 @@ Boston, MA 02111-1307, USA. */
/* This file just exists to give specs for the 960 running on VxWorks.
VxWorks does all the library stuff itself. */
+#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS { "msoft-float" }
#undef LIB_SPEC
diff -rup orig/egcs-CVS20011020/gcc/config/m32r/m32r.md egcs-CVS20011020/gcc/config/m32r/m32r.md
--- orig/egcs-CVS20011020/gcc/config/m32r/m32r.md Mon Jun 11 16:30:26 2001
+++ egcs-CVS20011020/gcc/config/m32r/m32r.md Sat Oct 20 13:27:54 2001
@@ -1448,7 +1448,7 @@
""
"*
{
- char *br,*invbr;
+ const char *br,*invbr;
char asmtext[40];
switch (GET_CODE (operands[1]))
@@ -1495,7 +1495,7 @@
""
"*
{
- char *br,*invbr;
+ const char *br,*invbr;
char asmtext[40];
switch (GET_CODE (operands[1]))
diff -rup orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11-protos.h egcs-CVS20011020/gcc/config/m68hc11/m68hc11-protos.h
--- orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11-protos.h Fri Jul 6 16:31:16 2001
+++ egcs-CVS20011020/gcc/config/m68hc11/m68hc11-protos.h Sat Oct 20 13:43:18 2001
@@ -34,7 +34,7 @@ extern int m68hc11_function_block_profil
extern int m68hc11_block_profiler PARAMS((FILE*,int));
-extern void m68hc11_asm_file_start PARAMS((FILE*, char*));
+extern void m68hc11_asm_file_start PARAMS((FILE*, const char*));
#ifdef TREE_CODE
extern void m68hc11_function_arg_advance PARAMS((CUMULATIVE_ARGS*,
diff -rup orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11.c egcs-CVS20011020/gcc/config/m68hc11/m68hc11.c
--- orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11.c Sun Oct 7 12:27:01 2001
+++ egcs-CVS20011020/gcc/config/m68hc11/m68hc11.c Sat Oct 20 13:46:08 2001
@@ -52,6 +52,7 @@ Note:
#include "basic-block.h"
#include "function.h"
#include "ggc.h"
+#include "reload.h"
#include "target.h"
#include "target-def.h"
@@ -1095,7 +1096,7 @@ m68hc11_initialize_trampoline (tramp, fn
rtx fnaddr;
rtx cxt;
{
- char *static_chain_reg = reg_names[STATIC_CHAIN_REGNUM];
+ const char *static_chain_reg = reg_names[STATIC_CHAIN_REGNUM];
/* Skip the '*'. */
if (*static_chain_reg == '*')
@@ -5216,7 +5217,7 @@ static void
print_options (out)
FILE *out;
{
- char *a_time;
+ const char *a_time;
long c_time;
int i;
extern int save_argc;
@@ -5246,7 +5247,7 @@ print_options (out)
void
m68hc11_asm_file_start (out, main_file)
FILE *out;
- char *main_file;
+ const char *main_file;
{
fprintf (out, ";;;-----------------------------------------\n");
fprintf (out, ";;; Start MC68HC11 gcc assembly output\n");
diff -rup orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11.md egcs-CVS20011020/gcc/config/m68hc11/m68hc11.md
--- orig/egcs-CVS20011020/gcc/config/m68hc11/m68hc11.md Mon Oct 1 16:30:18 2001
+++ egcs-CVS20011020/gcc/config/m68hc11/m68hc11.md Sat Oct 20 13:38:01 2001
@@ -1338,8 +1338,6 @@
""
"*
{
- rtx ops[2];
-
if (A_REG_P (operands[0]))
return \"#\";
@@ -1919,10 +1917,10 @@
"*
{
rtx ops[3];
- char* add_insn;
- char* inc_insn;
- char* incb_mem;
- char* inch_mem;
+ const char* add_insn;
+ const char* inc_insn;
+ const char* incb_mem;
+ const char* inch_mem;
HOST_WIDE_INT val;
if (which_alternative > 2)
@@ -6148,7 +6146,7 @@
output_asm_insn (\"ldd\\t%2\", operands);
if ((INTVAL (operands[1]) & 0x0ff00) == 0x100)
output_asm_insn (\"inca\", operands);
- else if (INTVAL (operands[1]) & 0x0ff00 == 0xff00)
+ else if ((INTVAL (operands[1]) & 0x0ff00) == 0xff00)
output_asm_insn (\"deca\", operands);
else if (INTVAL (operands[1]) != 0)
output_asm_insn (\"adda\\t%h1\", operands);
diff -rup orig/egcs-CVS20011020/gcc/config/mcore/mcore.h egcs-CVS20011020/gcc/config/mcore/mcore.h
--- orig/egcs-CVS20011020/gcc/config/mcore/mcore.h Tue Oct 9 07:30:34 2001
+++ egcs-CVS20011020/gcc/config/mcore/mcore.h Sat Oct 20 13:56:35 2001
@@ -1111,6 +1111,7 @@ switch_to_section (section, decl) \
}
/* Switch into a generic section. */
+#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION mcore_asm_named_section
/* This is how to output an insn to push a register on the stack.
diff -rup orig/egcs-CVS20011020/gcc/config/mn10200/mn10200.c egcs-CVS20011020/gcc/config/mn10200/mn10200.c
--- orig/egcs-CVS20011020/gcc/config/mn10200/mn10200.c Sun Jul 8 07:30:33 2001
+++ egcs-CVS20011020/gcc/config/mn10200/mn10200.c Sat Oct 20 14:08:28 2001
@@ -1029,7 +1029,7 @@ enum shift_type
enum shift_mode
{
- HIshift,
+ HIshift
};
/* For single bit shift insns, record assembler and what bits of the
diff -rup orig/egcs-CVS20011020/gcc/config/mn10300/mn10300-protos.h egcs-CVS20011020/gcc/config/mn10300/mn10300-protos.h
--- orig/egcs-CVS20011020/gcc/config/mn10300/mn10300-protos.h Tue Dec 5 22:56:43 2000
+++ egcs-CVS20011020/gcc/config/mn10300/mn10300-protos.h Sat Oct 20 14:11:27 2001
@@ -34,7 +34,7 @@ extern void mn10300_gen_multiple_store P
extern void notice_update_cc PARAMS ((rtx, rtx));
extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
enum machine_mode, rtx));
-extern char *output_tst PARAMS ((rtx, rtx));
+extern const char *output_tst PARAMS ((rtx, rtx));
extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int call_address_operand PARAMS ((rtx, enum machine_mode));
diff -rup orig/egcs-CVS20011020/gcc/config/mn10300/mn10300.c egcs-CVS20011020/gcc/config/mn10300/mn10300.c
--- orig/egcs-CVS20011020/gcc/config/mn10300/mn10300.c Mon Aug 13 16:30:42 2001
+++ egcs-CVS20011020/gcc/config/mn10300/mn10300.c Sat Oct 20 14:11:21 2001
@@ -1029,7 +1029,7 @@ function_arg_partial_nregs (cum, mode, t
}
/* Output a tst insn. */
-char *
+const char *
output_tst (operand, insn)
rtx operand, insn;
{
diff -rup orig/egcs-CVS20011020/gcc/config/pa/long_double.h egcs-CVS20011020/gcc/config/pa/long_double.h
--- orig/egcs-CVS20011020/gcc/config/pa/long_double.h Sat Aug 18 16:30:28 2001
+++ egcs-CVS20011020/gcc/config/pa/long_double.h Sat Oct 20 12:48:37 2001
@@ -24,10 +24,10 @@ Boston, MA 02111-1307, USA. */
#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \
do { long value[4]; \
REAL_VALUE_TO_TARGET_LONG_DOUBLE ((VALUE), value); \
- fprintf((FILE), "%s\t0x%x\n", "\t.word", value[0]); \
- fprintf((FILE), "%s\t0x%x\n", "\t.word", value[1]); \
- fprintf((FILE), "%s\t0x%x\n", "\t.word", value[2]); \
- fprintf((FILE), "%s\t0x%x\n", "\t.word", value[3]); \
+ fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[0]); \
+ fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[1]); \
+ fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[2]); \
+ fprintf((FILE), "%s\t0x%lx\n", "\t.word", value[3]); \
} while (0)
diff -rup orig/egcs-CVS20011020/gcc/config/pa/pa-protos.h egcs-CVS20011020/gcc/config/pa/pa-protos.h
--- orig/egcs-CVS20011020/gcc/config/pa/pa-protos.h Sat Aug 18 16:30:28 2001
+++ egcs-CVS20011020/gcc/config/pa/pa-protos.h Sat Oct 20 12:51:59 2001
@@ -133,7 +133,7 @@ extern struct rtx_def *hppa_builtin_save
extern void output_deferred_plabels PARAMS ((FILE *));
extern void override_options PARAMS ((void));
-extern void output_ascii PARAMS ((FILE *, const unsigned char *, int));
+extern void output_ascii PARAMS ((FILE *, const char *, int));
extern int compute_frame_size PARAMS ((int, int *));
extern int and_mask_p PARAMS ((unsigned HOST_WIDE_INT));
extern int cint_ok_for_move PARAMS ((HOST_WIDE_INT));
diff -rup orig/egcs-CVS20011020/gcc/config/pa/pa.c egcs-CVS20011020/gcc/config/pa/pa.c
--- orig/egcs-CVS20011020/gcc/config/pa/pa.c Sun Oct 7 12:27:02 2001
+++ egcs-CVS20011020/gcc/config/pa/pa.c Sat Oct 20 12:51:48 2001
@@ -2488,7 +2488,7 @@ output_64bit_ior (operands)
void
output_ascii (file, p, size)
FILE *file;
- const unsigned char *p;
+ const char *p;
int size;
{
int i;
diff -rup orig/egcs-CVS20011020/gcc/config/pa/som.h egcs-CVS20011020/gcc/config/pa/som.h
--- orig/egcs-CVS20011020/gcc/config/pa/som.h Mon Sep 24 16:30:33 2001
+++ egcs-CVS20011020/gcc/config/pa/som.h Sat Oct 20 12:45:31 2001
@@ -285,6 +285,7 @@ do { \
works correctly). */
#define EXTRA_SECTION_FUNCTIONS \
+extern void readonly_data PARAMS ((void)); \
void \
readonly_data () \
{ \
diff -rup orig/egcs-CVS20011020/gcc/config/pdp11/pdp11.md egcs-CVS20011020/gcc/config/pdp11/pdp11.md
--- orig/egcs-CVS20011020/gcc/config/pdp11/pdp11.md Fri Aug 3 07:30:22 2001
+++ egcs-CVS20011020/gcc/config/pdp11/pdp11.md Sat Oct 20 14:15:53 2001
@@ -1156,7 +1156,6 @@
""
"
{
- extern rtx expand_unop ();
if (GET_CODE (operands[2]) == CONST_INT)
operands[2] = GEN_INT (~INTVAL (operands[2]));
else
@@ -1170,7 +1169,6 @@
""
"
{
- extern rtx expand_unop ();
if (GET_CODE (operands[2]) == CONST_INT)
operands[2] = GEN_INT (~INTVAL (operands[2]));
else
@@ -1184,7 +1182,6 @@
""
"
{
- extern rtx expand_unop ();
rtx op = operands[2];
if (GET_CODE (op) == CONST_INT)
operands[2] = GEN_INT (((1 << 8) - 1) & ~INTVAL (op));
diff -rup orig/egcs-CVS20011020/gcc/config/pj/pj-protos.h egcs-CVS20011020/gcc/config/pj/pj-protos.h
--- orig/egcs-CVS20011020/gcc/config/pj/pj-protos.h Wed Jan 5 00:57:17 2000
+++ egcs-CVS20011020/gcc/config/pj/pj-protos.h Sat Oct 20 14:19:58 2001
@@ -34,7 +34,7 @@ extern int pj_unsigned_comparison_operat
extern rtx pj_workout_arg_words PARAMS ((rtx, rtx));
extern void pj_machine_dependent_reorg PARAMS ((rtx));
extern void pj_print_operand PARAMS ((FILE * stream, rtx x, int code));
-extern char *pj_output_addsi3 PARAMS ((rtx * operands));
+extern const char *pj_output_addsi3 PARAMS ((rtx * operands));
#ifdef TREE_CODE
extern rtx pj_expand_builtin_va_arg PARAMS ((tree valist, tree type));
diff -rup orig/egcs-CVS20011020/gcc/config/pj/pj.c egcs-CVS20011020/gcc/config/pj/pj.c
--- orig/egcs-CVS20011020/gcc/config/pj/pj.c Thu Sep 13 10:32:52 2001
+++ egcs-CVS20011020/gcc/config/pj/pj.c Sat Oct 20 14:20:24 2001
@@ -110,6 +110,14 @@ enum machine_mode pj_cmp_mode;
static void pj_output_rval PARAMS ((rtx, enum machine_mode, rtx));
static void pj_output_store_into_lval PARAMS ((enum machine_mode mode, rtx op));
+static void pj_output_push_int PARAMS ((int));
+static void pj_output_load PARAMS ((enum machine_mode, int));
+static void pj_output_inc PARAMS ((rtx, int));
+static void pj_output_cnv_op PARAMS ((enum insn_code, rtx));
+static char mode_to_char PARAMS ((enum machine_mode));
+static void pj_output_varidx PARAMS ((enum machine_mode, int, int));
+static void pj_print_cond PARAMS ((enum rtx_code));
+static rtx *unique_src_operand PARAMS ((rtx *, rtx));
/* These vectors turn a register number into an offset from the vars
pointer register. */
@@ -568,7 +576,7 @@ pj_output_rval (op, mode, outer_op)
/* Store the top of stack into the lval operand OP. */
-void
+static void
pj_output_store_into_lval (mode, op)
enum machine_mode mode;
rtx op;
@@ -829,7 +837,7 @@ pj_function_incoming_arg (cum, mode, pas
int i;
if (mode == DImode || mode == DFmode)
{
- cum->arg_adjust[cum->total_words + 0] = +1;
+ cum->arg_adjust[cum->total_words + 0] = 1;
cum->arg_adjust[cum->total_words + 1] = -1;
}
else
@@ -844,7 +852,7 @@ pj_function_incoming_arg (cum, mode, pas
/* Output code to add two SImode values. Deals carefully with the the common
case of moving the optop. */
-char *
+const char *
pj_output_addsi3 (operands)
rtx *operands;
{
diff -rup orig/egcs-CVS20011020/gcc/config/romp/romp.md egcs-CVS20011020/gcc/config/romp/romp.md
--- orig/egcs-CVS20011020/gcc/config/romp/romp.md Tue Aug 8 18:40:49 2000
+++ egcs-CVS20011020/gcc/config/romp/romp.md Sat Oct 20 14:23:00 2001
@@ -1667,7 +1667,6 @@
operands[0] = XEXP (operands[0], 0);
if (GET_CODE (operands[0]) == SYMBOL_REF)
{
- extern rtx get_symref ();
char *real_fcnname
= (char *) alloca (strlen (XSTR (operands[0], 0)) + 2);
@@ -1726,7 +1725,6 @@
operands[1] = XEXP (operands[1], 0);
if (GET_CODE (operands[1]) == SYMBOL_REF)
{
- extern rtx get_symref ();
char *real_fcnname =
(char *) alloca (strlen (XSTR (operands[1], 0)) + 2);
diff -rup orig/egcs-CVS20011020/gcc/config/s390/linux.h egcs-CVS20011020/gcc/config/s390/linux.h
--- orig/egcs-CVS20011020/gcc/config/s390/linux.h Wed Sep 19 07:30:15 2001
+++ egcs-CVS20011020/gcc/config/s390/linux.h Sat Oct 20 14:47:19 2001
@@ -166,7 +166,7 @@ do { fprintf (FILE, "%s\t", ASM_LONG);
/* This is how to output an assembler line for a numeric constant byte. */
#define ASM_OUTPUT_BYTE(FILE, VALUE) \
- fprintf ((FILE), "%s 0x%x\n", ASM_BYTE_OP, (VALUE))
+ fprintf ((FILE), "%s 0x%x\n", ASM_BYTE_OP, (int)(VALUE))
/* internal macro to output long */
#define _ASM_OUTPUT_LONG(FILE, VALUE) \
@@ -224,12 +224,12 @@ do { fprintf (FILE, "%s\t", ASM_LONG);
#undef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do { \
- register unsigned char *_ascii_bytes = (unsigned char *) (STR); \
- register unsigned char *limit = _ascii_bytes + (LENGTH); \
+ register const unsigned char *_ascii_bytes = (const unsigned char *) (STR); \
+ register const unsigned char *limit = _ascii_bytes + (LENGTH); \
register unsigned bytes_in_chunk = 0; \
for (; _ascii_bytes < limit; _ascii_bytes++) \
{ \
- register unsigned char *p; \
+ register const unsigned char *p; \
if (bytes_in_chunk >= 64) \
{ \
fputc ('\n', (FILE)); \
@@ -237,7 +237,7 @@ do {
} \
for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \
continue; \
- if (p < limit && (p - _ascii_bytes) <= STRING_LIMIT) \
+ if (p < limit && (p - _ascii_bytes) <= (long)STRING_LIMIT) \
{ \
if (bytes_in_chunk > 0) \
{ \
@@ -307,7 +307,9 @@ do {
fprintf (FILE, "@GOTENT\n"); \
fprintf (FILE, "\tlg 1,0(1)\n"); \
fprintf (FILE, "\tbr 1\n"); \
- fprintf (FILE, "0:\t.long %d\n",DELTA); \
+ fprintf (FILE, "0:\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
} \
else \
{ \
@@ -318,7 +320,9 @@ do {
fprintf (FILE, "\tjg "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "\n"); \
- fprintf (FILE, "0:\t.long %d\n",DELTA); \
+ fprintf (FILE, "0:\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
} \
} \
else \
@@ -330,7 +334,9 @@ do {
fprintf (FILE, "\t.long "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "@GOT\n"); \
- fprintf (FILE, "\t.long %d\n",DELTA); \
+ fprintf (FILE, "\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "0:\tal %d,8(1)\n", \
aggregate_value_p (TREE_TYPE \
(TREE_TYPE (FUNCTION))) ? 3 : 2 ); \
@@ -344,7 +350,9 @@ do {
fprintf (FILE, "\t.long "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "-.\n"); \
- fprintf (FILE, "\t.long %d\n",DELTA); \
+ fprintf (FILE, "\t.long "); \
+ fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA)); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "0:\tal %d,4(1)\n", \
aggregate_value_p (TREE_TYPE \
(TREE_TYPE (FUNCTION))) ? 3 : 2 ); \
diff -rup orig/egcs-CVS20011020/gcc/config/s390/s390.c egcs-CVS20011020/gcc/config/s390/s390.c
--- orig/egcs-CVS20011020/gcc/config/s390/s390.c Sat Oct 6 07:30:20 2001
+++ egcs-CVS20011020/gcc/config/s390/s390.c Sat Oct 20 14:41:37 2001
@@ -2161,8 +2161,7 @@ s390_final_chunkify (chunkify)
{
debug_rtx (insn);
debug_rtx (tmp);
- fprintf (stderr, "s390 multiple literalpool support:"
- "\n No code label between this insn %X %X",
+ fprintf (stderr, "s390 multiple literalpool support:\n No code label between this insn %X %X",
naddr, INSN_ADDRESSES (INSN_UID (tmp)));
abort ();
}
@@ -2487,8 +2486,7 @@ s390_function_prologue (file, lsize)
long frame_size;
rtx stack_label = 0, got_label = 0;
char *l;
- char b64[2] = " ";
- b64[0] = TARGET_64BIT ? 'g' : '\0';
+ const char *const b64 = TARGET_64BIT ? "g" : "";
/* Check for too large size of local variables */
@@ -2801,9 +2799,8 @@ s390_function_epilogue (file, lsize)
long frame_size;
int return_reg = RETURN_REGNUM;
int fp, offset;
- char b64[2] = " ";
+ const char *const b64 = TARGET_64BIT ? "g" : "";
- b64[0] = TARGET_64BIT ? 'g' : '\0';
frame_size = STARTING_FRAME_OFFSET + lsize + save_fprs_p () * 64;
if (current_function_uses_pic_offset_table)
diff -rup orig/egcs-CVS20011020/gcc/config/s390/s390.h egcs-CVS20011020/gcc/config/s390/s390.h
--- orig/egcs-CVS20011020/gcc/config/s390/s390.h Sun Sep 30 00:13:59 2001
+++ egcs-CVS20011020/gcc/config/s390/s390.h Sat Oct 20 14:25:06 2001
@@ -814,7 +814,6 @@ CUMULATIVE_ARGS;
do { \
extern rtx s390_profile[]; \
extern int s390_pool_count; \
- rtx tmp; \
static char label[128]; \
fprintf (FILE, "# function profiler \n"); \
if (TARGET_64BIT) \
diff -rup orig/egcs-CVS20011020/gcc/config/v850/v850-c.c egcs-CVS20011020/gcc/config/v850/v850-c.c
--- orig/egcs-CVS20011020/gcc/config/v850/v850-c.c Thu Sep 20 23:12:41 2001
+++ egcs-CVS20011020/gcc/config/v850/v850-c.c Sat Oct 20 14:51:28 2001
@@ -93,7 +93,7 @@ mark_current_function_as_interrupt ()
if (current_function_decl == NULL_TREE)
{
warning ("Cannot set interrupt attribute: no current function");
- return 0;
+ return;
}
name = get_identifier ("interrupt");
@@ -101,7 +101,7 @@ mark_current_function_as_interrupt ()
if (name == NULL_TREE || TREE_CODE (name) != IDENTIFIER_NODE)
{
warning ("Cannot set interrupt attribute: no such identifier");
- return 0;
+ return;
}
decl_attributes (¤t_function_decl,
diff -rup orig/egcs-CVS20011020/gcc/config/v850/v850.c egcs-CVS20011020/gcc/config/v850/v850.c
--- orig/egcs-CVS20011020/gcc/config/v850/v850.c Thu Sep 20 23:12:43 2001
+++ egcs-CVS20011020/gcc/config/v850/v850.c Sat Oct 20 14:55:41 2001
@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */
#include "cpplib.h"
#include "c-lex.h"
#include "ggc.h"
+#include "integrate.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
diff -rup orig/egcs-CVS20011020/gcc/config/v850/v850.h egcs-CVS20011020/gcc/config/v850/v850.h
--- orig/egcs-CVS20011020/gcc/config/v850/v850.h Fri Oct 19 19:18:02 2001
+++ egcs-CVS20011020/gcc/config/v850/v850.h Sat Oct 20 14:54:15 2001
@@ -1346,7 +1346,7 @@ do { char dstr[30]; \
#undef ASM_OUTPUT_LABELREF
#define ASM_OUTPUT_LABELREF(FILE, NAME) \
do { \
- char* real_name; \
+ const char* real_name; \
STRIP_NAME_ENCODING (real_name, (NAME)); \
asm_fprintf (FILE, "%U%s", real_name); \
} while (0)
diff -rup orig/egcs-CVS20011020/gcc/config/vax/vax-protos.h egcs-CVS20011020/gcc/config/vax/vax-protos.h
--- orig/egcs-CVS20011020/gcc/config/vax/vax-protos.h Fri Aug 3 07:30:23 2001
+++ egcs-CVS20011020/gcc/config/vax/vax-protos.h Sat Oct 20 15:02:21 2001
@@ -36,3 +36,4 @@ extern void vms_check_external PARAMS ((
#endif /* TREE_CODE */
extern void vms_flush_pending_externals PARAMS ((FILE *));
+extern void const_section PARAMS ((void));
diff -rup orig/egcs-CVS20011020/gcc/cp/lex.c egcs-CVS20011020/gcc/cp/lex.c
--- orig/egcs-CVS20011020/gcc/cp/lex.c Sun Oct 14 16:30:15 2001
+++ egcs-CVS20011020/gcc/cp/lex.c Sat Oct 20 11:36:57 2001
@@ -71,6 +71,7 @@ static int token_cmp PARAMS ((int *, int
#endif
static int is_global PARAMS ((tree));
static void init_operators PARAMS ((void));
+static void copy_lang_type PARAMS ((tree));
/* A constraint that can be tested at compile time. */
#ifdef __STDC__
@@ -1573,7 +1574,7 @@ copy_decl (decl)
/* Replace the shared language-specific parts of NODE with a new copy. */
-void
+static void
copy_lang_type (node)
tree node;
{
diff -rup orig/egcs-CVS20011020/gcc/dwarf2asm.c egcs-CVS20011020/gcc/dwarf2asm.c
--- orig/egcs-CVS20011020/gcc/dwarf2asm.c Wed Oct 3 16:30:22 2001
+++ egcs-CVS20011020/gcc/dwarf2asm.c Sat Oct 20 11:24:10 2001
@@ -190,7 +190,8 @@ dw2_asm_output_offset VPARAMS ((int size
different section or object file. */
void
-dw2_asm_output_pcrel VPARAMS ((int size, const char *label,
+dw2_asm_output_pcrel VPARAMS ((int size ATTRIBUTE_UNUSED,
+ const char *label ATTRIBUTE_UNUSED,
const char *comment, ...))
{
VA_OPEN (ap, comment);
diff -rup orig/egcs-CVS20011020/gcc/final.c egcs-CVS20011020/gcc/final.c
--- orig/egcs-CVS20011020/gcc/final.c Sat Oct 20 07:30:22 2001
+++ egcs-CVS20011020/gcc/final.c Sat Oct 20 14:49:12 2001
@@ -2271,11 +2271,13 @@ final_scan_insn (insn, file, optimize, p
#endif
if (align && NEXT_INSN (insn))
+ {
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
- ASM_OUTPUT_MAX_SKIP_ALIGN (file, align, max_skip);
+ ASM_OUTPUT_MAX_SKIP_ALIGN (file, align, max_skip);
#else
- ASM_OUTPUT_ALIGN (file, align);
+ ASM_OUTPUT_ALIGN (file, align);
#endif
+ }
}
#ifdef HAVE_cc0
CC_STATUS_INIT;
diff -rup orig/egcs-CVS20011020/gcc/flow.c egcs-CVS20011020/gcc/flow.c
--- orig/egcs-CVS20011020/gcc/flow.c Sat Oct 20 07:30:23 2001
+++ egcs-CVS20011020/gcc/flow.c Sat Oct 20 11:31:10 2001
@@ -4105,7 +4105,6 @@ static void
clear_log_links (blocks)
sbitmap blocks;
{
- rtx insn;
int i;
if (!blocks)
diff -rup orig/egcs-CVS20011020/gcc/gcc.c egcs-CVS20011020/gcc/gcc.c
--- orig/egcs-CVS20011020/gcc/gcc.c Fri Oct 19 15:33:30 2001
+++ egcs-CVS20011020/gcc/gcc.c Sat Oct 20 15:09:50 2001
@@ -318,6 +318,9 @@ static void init_gcc_specs
const char *,
const char *));
#endif
+#if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
+static const char *convert_filename PARAMS ((const char *, int));
+#endif
/* The Specs Language
@@ -2900,12 +2903,14 @@ static int *warn_std_ptr = 0;
/* Convert NAME to a new name if it is the standard suffix. DO_EXE
is true if we should look for an executable suffix as well. */
-static char *
+static const char *
convert_filename (name, do_exe)
- char *name;
- int do_exe;
+ const char *name;
+ int do_exe ATTRIBUTE_UNUSED;
{
+#if defined(HAVE_TARGET_EXECUTABLE_SUFFIX)
int i;
+#endif
int len;
if (name == NULL)
diff -rup orig/egcs-CVS20011020/gcc/output.h egcs-CVS20011020/gcc/output.h
--- orig/egcs-CVS20011020/gcc/output.h Fri Oct 19 20:20:05 2001
+++ egcs-CVS20011020/gcc/output.h Sat Oct 20 13:53:07 2001
@@ -198,6 +198,10 @@ extern void tdesc_section PARAMS ((void)
extern void drectve_section PARAMS ((void));
#endif
+#ifdef SDATA_SECTION_ASM_OP
+extern void sdata_section PARAMS ((void));
+#endif
+
#ifdef TREE_CODE
/* Tell assembler to change to section NAME for DECL.
If DECL is NULL, just switch to section NAME.
diff -rup orig/egcs-CVS20011020/gcc/tlink.c egcs-CVS20011020/gcc/tlink.c
--- orig/egcs-CVS20011020/gcc/tlink.c Wed Sep 12 12:05:28 2001
+++ egcs-CVS20011020/gcc/tlink.c Sat Oct 20 11:35:04 2001
@@ -495,8 +495,8 @@ recompile_files ()
{
file *f;
- putenv ("COMPILER_PATH");
- putenv ("LIBRARY_PATH");
+ putenv (xstrdup ("COMPILER_PATH"));
+ putenv (xstrdup ("LIBRARY_PATH"));
while ((f = file_pop ()) != NULL)
{