* Patch installed for various target warnings
@ 2001-11-13 15:03 Kaveh R. Ghazi
0 siblings, 0 replies; 2+ messages in thread
From: Kaveh R. Ghazi @ 2001-11-13 15:03 UTC (permalink / raw)
To: gcc-patches
I installed the following set of obvious warnings fixes. The list of
unique warnings fixed is:
< cppdefault.c:31: warning: ISO C does not allow extra `;' outside of a function
< insn-output.c:131: warning: `val' might be used uninitialized in this function
< insn-output.c:403: warning: assignment discards qualifiers from pointer target type
< insn-output.c:404: warning: assignment discards qualifiers from pointer target type
< insn-output.c:405: warning: assignment discards qualifiers from pointer target type
< insn-output.c:406: warning: assignment discards qualifiers from pointer target type
< insn-output.c:407: warning: assignment discards qualifiers from pointer target type
< insn-output.c:408: warning: assignment discards qualifiers from pointer target type
< insn-output.c:442: warning: assignment discards qualifiers from pointer target type
< insn-output.c:443: warning: assignment discards qualifiers from pointer target type
< insn-output.c:444: warning: assignment discards qualifiers from pointer target type
< insn-output.c:445: warning: assignment discards qualifiers from pointer target type
< insn-output.c:446: warning: assignment discards qualifiers from pointer target type
< insn-output.c:447: warning: assignment discards qualifiers from pointer target type
< print-rtl.c:50: warning: ISO C does not allow extra `;' outside of a function
< protoize.c:212: warning: ISO C does not allow extra `;' outside of a function
< toplev.c:4560: warning: assignment discards qualifiers from pointer target type
< toplev.c:4560: warning: initialization discards qualifiers from pointer target type
< varasm.c:782: warning: (near initialization for `table[0]')
< varasm.c:782: warning: missing braces around initializer
Tested by cross compiling cc1 from sparc-sun-solaris2.7 to the
following affected targets:
a29k-unknown-sym1
i386-sun-sunos
i386-unknown-beoself
m32r-unknown-elf
m68k-apple-aux
m68k-ncr-sysv
mn10200-unknown-elf
2001-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* a29k/unix.h (ASM_FILE_START): Const-ify.
* i386/beos-elf.h (INCLUDE_DEFAULTS): Remove semi-colon.
* i386/isc.h (ASM_FILE_START): Const-ify.
* i386/sun386.h (ASM_FILE_START): Likewise.
* m32r.md: Likewise.
* m68k/auxas.h (ADDITIONAL_REGISTER_NAMES): Add missing brackets.
* m68k/auxgas.h ADDITIONAL_REGISTER_NAMES): Likewise.
* m68k/tower.h (REGISTER_NAMES): Remove semi-colon.
* mn10200.md: Initialize variable.
diff -rup orig/egcs-CVS20011114/gcc/config/a29k/unix.h egcs-CVS20011114/gcc/config/a29k/unix.h
--- orig/egcs-CVS20011114/gcc/config/a29k/unix.h Thu Nov 2 18:29:07 2000
+++ egcs-CVS20011114/gcc/config/a29k/unix.h Sat Nov 17 11:18:44 2001
@@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */
#undef ASM_FILE_START
#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-CVS20011114/gcc/config/i386/beos-elf.h egcs-CVS20011114/gcc/config/i386/beos-elf.h
--- orig/egcs-CVS20011114/gcc/config/i386/beos-elf.h Wed Oct 31 16:30:48 2001
+++ egcs-CVS20011114/gcc/config/i386/beos-elf.h Sat Nov 17 11:36:41 2001
@@ -188,7 +188,7 @@ Boston, MA 02111-1307, USA. */
{ "/boot/develop/headers/posix", 0, 0, 0 },\
{ "/boot/develop/headers", 0, 0, 0 }, \
{ 0, 0, 0, 0 } \
- };
+ }
#else /* CROSS_COMPILE */
#undef INCLUDE_DEFAULTS
#define INCLUDE_DEFAULTS \
@@ -230,7 +230,7 @@ Boston, MA 02111-1307, USA. */
{ CROSS_INCLUDE_DIR "/posix", 0, 0, 0 },\
{ CROSS_INCLUDE_DIR , 0, 0, 0 }, \
{ 0, 0, 0, 0 } \
- };
+ }
#endif
/* Whee. LIBRARY_PATH is Be's LD_LIBRARY_PATH, which of course will
diff -rup orig/egcs-CVS20011114/gcc/config/i386/isc.h egcs-CVS20011114/gcc/config/i386/isc.h
--- orig/egcs-CVS20011114/gcc/config/i386/isc.h Wed Oct 31 16:30:52 2001
+++ egcs-CVS20011114/gcc/config/i386/isc.h Sat Nov 17 11:22:50 2001
@@ -74,8 +74,8 @@
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
do { \
- int len = strlen (main_input_filename); \
- char *na = main_input_filename + len; \
+ const int len = strlen (main_input_filename); \
+ const char *na = main_input_filename + len; \
char shorter[15]; \
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
while (na > main_input_filename) \
diff -rup orig/egcs-CVS20011114/gcc/config/i386/sun386.h egcs-CVS20011114/gcc/config/i386/sun386.h
--- orig/egcs-CVS20011114/gcc/config/i386/sun386.h Sun Nov 11 00:53:30 2001
+++ egcs-CVS20011114/gcc/config/i386/sun386.h Sat Nov 17 11:21:39 2001
@@ -59,8 +59,8 @@ do \
#define ASM_FILE_START(FILE) \
do { \
{ \
- int len = strlen (main_input_filename); \
- char *na = main_input_filename + len; \
+ const int len = strlen (main_input_filename); \
+ const char *na = main_input_filename + len; \
char shorter[15]; \
/* NA gets MAIN_INPUT_FILENAME sans directory names. */\
while (na > main_input_filename) \
diff -rup orig/egcs-CVS20011114/gcc/config/m32r/m32r.md egcs-CVS20011114/gcc/config/m32r/m32r.md
--- orig/egcs-CVS20011114/gcc/config/m32r/m32r.md Fri Nov 9 16:30:28 2001
+++ egcs-CVS20011114/gcc/config/m32r/m32r.md Sat Nov 17 11:28:04 2001
@@ -1510,7 +1510,7 @@
""
"*
{
- char *br,*invbr;
+ const char *br,*invbr;
char asmtext[40];
switch (GET_CODE (operands[1]))
@@ -1557,7 +1557,7 @@
""
"*
{
- char *br,*invbr;
+ const char *br,*invbr;
char asmtext[40];
switch (GET_CODE (operands[1]))
diff -rup orig/egcs-CVS20011114/gcc/config/m68k/auxas.h egcs-CVS20011114/gcc/config/m68k/auxas.h
--- orig/egcs-CVS20011114/gcc/config/m68k/auxas.h Mon Oct 8 17:21:22 2001
+++ egcs-CVS20011114/gcc/config/m68k/auxas.h Sat Nov 17 11:09:18 2001
@@ -74,7 +74,7 @@ Boston, MA 02111-1307, USA. */
#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "L%"
-#define ADDITIONAL_REGISTER_NAMES { "%a6", 14, "%a7", 15 }
+#define ADDITIONAL_REGISTER_NAMES { {"%a6", 14}, {"%a7", 15} }
#undef ASM_OUTPUT_INT
#define ASM_OUTPUT_INT(FILE,VALUE) \
diff -rup orig/egcs-CVS20011114/gcc/config/m68k/auxgas.h egcs-CVS20011114/gcc/config/m68k/auxgas.h
--- orig/egcs-CVS20011114/gcc/config/m68k/auxgas.h Thu Aug 9 22:48:11 2001
+++ egcs-CVS20011114/gcc/config/m68k/auxgas.h Sat Nov 17 11:09:37 2001
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
#define NO_DOT_IN_LABEL
#endif
-#define ADDITIONAL_REGISTER_NAMES { "%fp", 14, "%a7", 15 }
+#define ADDITIONAL_REGISTER_NAMES { {"%fp", 14}, {"%a7", 15} }
#define ASM_MOV_INSN "movel"
diff -rup orig/egcs-CVS20011114/gcc/config/m68k/tower.h egcs-CVS20011114/gcc/config/m68k/tower.h
--- orig/egcs-CVS20011114/gcc/config/m68k/tower.h Thu Nov 1 16:30:37 2001
+++ egcs-CVS20011114/gcc/config/m68k/tower.h Sat Nov 17 11:38:41 2001
@@ -88,7 +88,7 @@ Boston, MA 02111-1307, USA. */
#define REGISTER_NAMES \
{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7", \
"%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%sp", \
- "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"};
+ "%fp0", "%fp1", "%fp2", "%fp3", "%fp4", "%fp5", "%fp6", "%fp7"}
#undef REGISTER_PREFIX
#define REGISTER_PREFIX "%"
diff -rup orig/egcs-CVS20011114/gcc/config/mn10200/mn10200.md egcs-CVS20011114/gcc/config/mn10200/mn10200.md
--- orig/egcs-CVS20011114/gcc/config/mn10200/mn10200.md Tue May 16 14:18:32 2000
+++ egcs-CVS20011114/gcc/config/mn10200/mn10200.md Sat Nov 17 11:32:02 2001
@@ -264,7 +264,7 @@
default:
{
- long val;
+ long val = 0;
REAL_VALUE_TYPE rv;
if (GET_CODE (operands[1]) == CONST_DOUBLE)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch installed for various target warnings
@ 2002-08-11 12:27 Kaveh R. Ghazi
0 siblings, 0 replies; 2+ messages in thread
From: Kaveh R. Ghazi @ 2002-08-11 12:27 UTC (permalink / raw)
To: gcc-patches
A few more fixes from the target farm.
Tested by cross compiling cc1 to the following targets:
dsp16xx-unknown-elf frv-unknown-elf h8300-unknown-elf ip2k-unknown-elf
mmix-knuth-mmixware sh-unknown-netbsdelf v850-unknown-rtems
Installed as obvious.
2002-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* dsp16xx.c (print_operand): Fix format specifier.
* dsp16xx.md: Avoid automatic aggregate initialization.
* frv.h (REG_CLASS_FROM_LETTER): Avoid char as array index.
* h8300.c (emit_a_rotate, h8300_adjust_insn_length): Avoid U
integer constant modifier.
* ip2k.c (ip2k_set_compare): Avoid signed/unsigned warning.
* mmix-protos.h (mmix_use_simple_return): Move outside TREE_CODE
guards.
* sh/netbsd-elf.h (FUNCTION_PROFILER): Fix format specifier.
* v850.c (v850_select_section): Mark parameter with
ATTRIBUTE_UNUSED.
* global.c (global_alloc): Const-ify.
* ra-colorize.c (hardregset_to_string): Fix format specifier.
diff -rup orig/egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.c egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.c
--- orig/egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.c 2002-07-29 22:05:01.000000000 -0400
+++ egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.c 2002-08-10 14:50:44.583130986 -0400
@@ -1841,7 +1841,7 @@ print_operand(file, op, letter)
REAL_VALUE_TYPE r;
REAL_VALUE_FROM_CONST_DOUBLE (r, op);
REAL_VALUE_TO_TARGET_SINGLE (r, l);
- fprintf (file, "0x%x", l);
+ fprintf (file, "0x%lx", l);
}
else if (code == CONST)
{
diff -rup orig/egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.md egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.md
--- orig/egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.md 2002-05-13 07:00:56.000000000 -0400
+++ egcc-CVS20020810/gcc/config/dsp16xx/dsp16xx.md 2002-08-10 15:49:01.885155220 -0400
@@ -1935,7 +1935,9 @@
rtx reg3 = gen_reg_rtx (HImode);
rtx label1 = gen_label_rtx ();
rtx label2 = gen_label_rtx ();
- REAL_VALUE_TYPE offset = REAL_VALUE_LDEXP (dconst1, 31);
+ REAL_VALUE_TYPE offset;
+
+ offset = REAL_VALUE_LDEXP (dconst1, 31);
if (reg1) /* turn off complaints about unreached code */
{
diff -rup orig/egcc-CVS20020810/gcc/config/frv/frv.h egcc-CVS20020810/gcc/config/frv/frv.h
--- orig/egcc-CVS20020810/gcc/config/frv/frv.h 2002-08-04 15:37:03.000000000 -0400
+++ egcc-CVS20020810/gcc/config/frv/frv.h 2002-08-10 14:48:04.613055369 -0400
@@ -1375,7 +1375,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/egcc-CVS20020810/gcc/config/h8300/h8300.c egcc-CVS20020810/gcc/config/h8300/h8300.c
--- orig/egcc-CVS20020810/gcc/config/h8300/h8300.c 2002-06-20 07:01:26.000000000 -0400
+++ egcc-CVS20020810/gcc/config/h8300/h8300.c 2002-08-10 13:56:08.227190536 -0400
@@ -3211,7 +3212,7 @@ emit_a_rotate (code, operands)
/* Determine the faster direction. After this phase, amount will be
at most a half of GET_MODE_BITSIZE (mode). */
- if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U)
+ if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / (unsigned) 2)
{
/* Flip the direction. */
amount = GET_MODE_BITSIZE (mode) - amount;
@@ -3746,7 +3747,7 @@ h8300_adjust_insn_length (insn, length)
/* Determine the faster direction. After this phase, amount
will be at most a half of GET_MODE_BITSIZE (mode). */
- if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / 2U)
+ if ((unsigned int) amount > GET_MODE_BITSIZE (mode) / (unsigned) 2)
/* Flip the direction. */
amount = GET_MODE_BITSIZE (mode) - amount;
diff -rup orig/egcc-CVS20020810/gcc/config/ip2k/ip2k.c egcc-CVS20020810/gcc/config/ip2k/ip2k.c
--- orig/egcc-CVS20020810/gcc/config/ip2k/ip2k.c 2002-08-06 21:57:45.000000000 -0400
+++ egcc-CVS20020810/gcc/config/ip2k/ip2k.c 2002-08-10 15:58:06.149764505 -0400
@@ -1090,7 +1090,7 @@ ip2k_set_compare (x, y)
if (GET_MODE (x) == DImode && GET_CODE (y) == CONST_INT)
{
rtx value;
- int i;
+ size_t i;
value = rtx_alloc (CONST_DOUBLE);
PUT_MODE (value, VOIDmode);
diff -rup orig/egcc-CVS20020810/gcc/config/mmix/mmix-protos.h egcc-CVS20020810/gcc/config/mmix/mmix-protos.h
--- orig/egcc-CVS20020810/gcc/config/mmix/mmix-protos.h 2002-07-23 20:46:13.000000000 -0400
+++ egcc-CVS20020810/gcc/config/mmix/mmix-protos.h 2002-08-10 14:29:52.014896855 -0400
@@ -57,6 +57,7 @@ extern void mmix_output_register_setting
extern void mmix_conditional_register_usage PARAMS ((void));
extern int mmix_local_regno PARAMS ((int));
extern int mmix_dbx_register_number PARAMS ((int));
+extern int mmix_use_simple_return PARAMS ((void));
/* Things that need rtl.h, tree.h or real.h included, or in combination. */
@@ -81,7 +82,6 @@ extern void mmix_asm_output_aligned_loca
extern void mmix_asm_declare_register_global
PARAMS ((FILE *, tree, int, const char *));
extern void mmix_asm_output_mi_thunk PARAMS ((FILE *, tree, int, tree));
-extern int mmix_use_simple_return PARAMS ((void));
/* Need tree.h and rtl.h */
# ifdef RTX_CODE
diff -rup orig/egcc-CVS20020810/gcc/config/sh/netbsd-elf.h egcc-CVS20020810/gcc/config/sh/netbsd-elf.h
--- orig/egcc-CVS20020810/gcc/config/sh/netbsd-elf.h 2002-06-08 16:00:32.000000000 -0400
+++ egcc-CVS20020810/gcc/config/sh/netbsd-elf.h 2002-08-10 15:02:37.237966799 -0400
@@ -112,16 +112,16 @@ do \
} \
else \
{ \
- fprintf((STREAM), "\tmov.l\t%cLP%d,r1\n", \
+ fprintf((STREAM), "\tmov.l\t%sLP%d,r1\n", \
LOCAL_LABEL_PREFIX, (LABELNO)); \
- fprintf((STREAM), "\tmova\t%cLP%dr,r0\n", \
+ fprintf((STREAM), "\tmova\t%sLP%dr,r0\n", \
LOCAL_LABEL_PREFIX, (LABELNO)); \
fprintf((STREAM), "\tjmp\t@r1\n"); \
fprintf((STREAM), "\tnop\n"); \
fprintf((STREAM), "\t.align\t2\n"); \
- fprintf((STREAM), "%cLP%d:\t.long\t__mcount\n", \
+ fprintf((STREAM), "%sLP%d:\t.long\t__mcount\n", \
LOCAL_LABEL_PREFIX, (LABELNO)); \
- fprintf((STREAM), "%cLP%dr:\n", LOCAL_LABEL_PREFIX, (LABELNO)); \
+ fprintf((STREAM), "%sLP%dr:\n", LOCAL_LABEL_PREFIX, (LABELNO)); \
} \
} \
while (0)
diff -rup orig/egcc-CVS20020810/gcc/config/v850/v850.c egcc-CVS20020810/gcc/config/v850/v850.c
--- orig/egcc-CVS20020810/gcc/config/v850/v850.c 2002-05-25 23:16:55.000000000 -0400
+++ egcc-CVS20020810/gcc/config/v850/v850.c 2002-08-10 16:10:30.336327742 -0400
@@ -2876,7 +2876,7 @@ v850_return_addr (count)
static void
v850_select_section (exp, reloc, align)
tree exp;
- int reloc;
+ int reloc ATTRIBUTE_UNUSED;
unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
{
if (TREE_CODE (exp) == VAR_DECL)
diff -rup orig/egcc-CVS20020810/gcc/global.c egcc-CVS20020810/gcc/global.c
--- orig/egcc-CVS20020810/gcc/global.c 2002-07-21 21:00:57.000000000 -0400
+++ egcc-CVS20020810/gcc/global.c 2002-08-10 15:43:39.704507686 -0400
@@ -367,8 +367,8 @@ global_alloc (file)
that need a register window. So prefer the ones that can be used in
a leaf function. */
{
- char *cheap_regs;
- char *leaf_regs = LEAF_REGISTERS;
+ const char *cheap_regs;
+ const char *const leaf_regs = LEAF_REGISTERS;
if (only_leaf_regs_used () && leaf_function_p ())
cheap_regs = leaf_regs;
diff -rup orig/egcc-CVS20020810/gcc/ra-colorize.c egcc-CVS20020810/gcc/ra-colorize.c
--- orig/egcc-CVS20020810/gcc/ra-colorize.c 2002-07-24 18:49:07.000000000 -0400
+++ egcc-CVS20020810/gcc/ra-colorize.c 2002-08-10 15:09:25.133782540 -0400
@@ -1160,7 +1160,7 @@ hardregset_to_string (s)
{
static char string[/*FIRST_PSEUDO_REGISTER + 30*/1024];
#if FIRST_PSEUDO_REGISTER <= HOST_BITS_PER_WIDE_INT
- sprintf (string, "%x", s);
+ sprintf (string, HOST_WIDE_INT_PRINT_HEX, s);
#else
char *c = string;
int i,j;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-11 19:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 15:03 Patch installed for various target warnings Kaveh R. Ghazi
2002-08-11 12:27 Kaveh R. Ghazi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).