This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for a29k warnings
- To: gcc-patches at gcc dot gnu dot org
- Subject: Patch for a29k warnings
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Sat, 13 Oct 2001 23:53:32 -0400 (EDT)
This patch kills the following warnings from a sparc-sun-solaris2.7
cross to a29k-unknown-rtems using the latest snapshot as the host
compiler.
> insn-attrtab.c:1172: warning: unused parameter `delay_insn'
> insn-emit.c:1780: warning: function declaration isn't a prototype
> insn-emit.c:1867: warning: function declaration isn't a prototype
> insn-emit.c:2039: warning: function declaration isn't a prototype
> insn-emit.c:2126: warning: function declaration isn't a prototype
> toplev.c:2241: warning: initialization discards qualifiers from pointer target type
> toplev.c:2241: warning: assignment discards qualifiers from pointer target type
> varasm.c:226: warning: function declaration isn't a prototype
In addition to the cross compile, I also did a full bootstrap on
sparc-sun-solaris2.7, no testsuite or warning regressions.
Okay to install?
--Kaveh
2001-10-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* a29k-protos.h (literal_section): Prototype.
* a29k.h (ASM_FILE_START): Don't discard pointer qualifier.
* a29k.md: Ensure function pointers are prototyped.
* genattrtab.c (write_eligible_delay): Mark parameter with
ATTRIBUTE_UNUSED.
diff -rup orig/egcs-CVS20011010/gcc/config/a29k/a29k-protos.h egcs-CVS20011010/gcc/config/a29k/a29k-protos.h
--- orig/egcs-CVS20011010/gcc/config/a29k/a29k-protos.h Fri Jul 6 16:31:08 2001
+++ egcs-CVS20011010/gcc/config/a29k/a29k-protos.h Thu Oct 11 15:37:39 2001
@@ -61,3 +61,5 @@ extern int null_epilogue PARAMS ((void))
extern void print_operand PARAMS ((FILE *, rtx, int));
extern void a29k_compute_reg_names PARAMS ((void));
#endif /* RTX_CODE */
+
+extern void literal_section PARAMS ((void));
diff -rup orig/egcs-CVS20011010/gcc/config/a29k/a29k.h egcs-CVS20011010/gcc/config/a29k/a29k.h
--- orig/egcs-CVS20011010/gcc/config/a29k/a29k.h Sat Aug 18 16:30:20 2001
+++ egcs-CVS20011010/gcc/config/a29k/a29k.h Thu Oct 11 15:35:04 2001
@@ -1316,7 +1316,7 @@ extern const char *a29k_function_name;
/* Output at beginning of assembler file. */
#define ASM_FILE_START(FILE) \
-{ char *p, *after_dir = main_input_filename; \
+{ const char *p, *after_dir = main_input_filename; \
if (TARGET_29050) \
fprintf (FILE, "\t.cputype 29050\n"); \
for (p = main_input_filename; *p; p++) \
diff -rup orig/egcs-CVS20011010/gcc/config/a29k/a29k.md egcs-CVS20011010/gcc/config/a29k/a29k.md
--- orig/egcs-CVS20011010/gcc/config/a29k/a29k.md Mon Jul 2 16:30:49 2001
+++ egcs-CVS20011010/gcc/config/a29k/a29k.md Thu Oct 11 15:29:01 2001
@@ -1776,7 +1776,7 @@
{
rtx general = gen_reg_rtx (SImode);
rtx bp = gen_reg_rtx (PSImode);
- rtx (*fcn) ()
+ rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx))
= TARGET_BYTE_WRITES ? gen_storehihww : gen_storehinhww;
rtx seq = (*fcn) (XEXP (operands[0], 0),
gen_lowpart (SImode, operands[1]),
@@ -1825,7 +1825,8 @@
(match_operand:PSI 2 "register_operand" "=b")])]
"! TARGET_DW_ENABLE"
"
-{ rtx (*fcn) () = TARGET_BYTE_WRITES ? gen_storehihww : gen_storehinhww;
+{ rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) =
+ TARGET_BYTE_WRITES ? gen_storehihww : gen_storehinhww;
rtx seq = (*fcn) (a29k_get_reloaded_address (operands[0]),
gen_lowpart (SImode, operands[1]),
gen_rtx_REG (SImode, R_TAV), operands[2]);
@@ -1906,7 +1907,7 @@
{
rtx general = gen_reg_rtx (SImode);
rtx bp = gen_reg_rtx (PSImode);
- rtx (*fcn) ()
+ rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx))
= TARGET_BYTE_WRITES ? gen_storeqihww : gen_storeqinhww;
rtx seq = (*fcn) (XEXP (operands[0], 0),
gen_lowpart (SImode, operands[1]),
@@ -1955,7 +1956,8 @@
(match_operand:PSI 2 "register_operand" "=b")])]
"! TARGET_DW_ENABLE"
"
-{ rtx (*fcn) () = TARGET_BYTE_WRITES ? gen_storeqihww : gen_storeqinhww;
+{ rtx (*fcn) PARAMS ((rtx, rtx, rtx, rtx)) =
+ TARGET_BYTE_WRITES ? gen_storeqihww : gen_storeqinhww;
rtx seq = (*fcn) (a29k_get_reloaded_address (operands[0]),
gen_lowpart (SImode, operands[1]),
gen_rtx_REG (SImode, R_TAV), operands[2]);
diff -rup orig/egcs-CVS20011010/gcc/genattrtab.c egcs-CVS20011010/gcc/genattrtab.c
--- orig/egcs-CVS20011010/gcc/genattrtab.c Wed Oct 10 16:30:30 2001
+++ egcs-CVS20011010/gcc/genattrtab.c Thu Oct 11 15:24:14 2001
@@ -5528,7 +5528,7 @@ write_eligible_delay (kind)
printf ("int\n");
printf ("eligible_for_%s (delay_insn, slot, candidate_insn, flags)\n",
kind);
- printf (" rtx delay_insn;\n");
+ printf (" rtx delay_insn ATTRIBUTE_UNUSED;\n");
printf (" int slot;\n");
printf (" rtx candidate_insn;\n");
printf (" int flags ATTRIBUTE_UNUSED;\n");