This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gcc-3_4-basic-improvements-branch] Patch installed for signed/unsigned warnings
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 9 Sep 2002 11:24:19 -0400 (EDT)
- Subject: [gcc-3_4-basic-improvements-branch] Patch installed for signed/unsigned warnings
The patch below fixes these warnings on h8300, mcore and mn10300 respectively:
> insn-output.c:112: warning: comparison between signed and unsigned
> insn-output.c:179: warning: comparison between signed and unsigned
> insn-output.c:849: warning: comparison between signed and unsigned
> insn-output.c:854: warning: comparison between signed and unsigned
> insn-output.c:856: warning: comparison between signed and unsigned
> config/mn10300/mn10300.c:1157: warning: comparison between signed and unsigned
Tested by cross-compiling cc1 to:
h8300-unknown-aout h8300-unknown-elf h8300-unknown-rtems
mcore-unknown-elf mcore-unknown-pe mn10300-unknown-elf
Installed as obvious to the gcc-3_4-basic-improvements-branch.
2002-09-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* h8300.md: Fix signed/unsigned warnings.
* mcore.md: Likewise.
* mn10300.c (mask_ok_for_mem_btst): Likewise.
diff -rup orig/egcc-CVS20020905/gcc/config/h8300/h8300.md egcc-CVS20020905/gcc/config/h8300/h8300.md
--- orig/egcc-CVS20020905/gcc/config/h8300/h8300.md 2002-06-01 07:01:07.000000000 -0400
+++ egcc-CVS20020905/gcc/config/h8300/h8300.md 2002-09-06 09:18:23.956612663 -0400
@@ -353,7 +353,7 @@
|| register_operand (operands[1], SImode))"
"*
{
- int rn = -1;
+ unsigned int rn = -1;
switch (which_alternative)
{
case 0:
@@ -420,7 +420,7 @@
"*
{
/* Copy of the movsi stuff. */
- int rn = -1;
+ unsigned int rn = -1;
switch (which_alternative)
{
case 0:
diff -rup orig/egcc-CVS20020905/gcc/config/mcore/mcore.md egcc-CVS20020905/gcc/config/mcore/mcore.md
--- orig/egcc-CVS20020905/gcc/config/mcore/mcore.md 2001-10-09 07:30:34.000000000 -0400
+++ egcc-CVS20020905/gcc/config/mcore/mcore.md 2002-09-06 09:22:30.418691949 -0400
@@ -3319,7 +3319,7 @@
""
"*
{
- int op0 = REGNO (operands[0]);
+ unsigned int op0 = REGNO (operands[0]);
if (GET_CODE (operands[3]) == REG)
{
diff -rup orig/egcc-CVS20020905/gcc/config/mn10300/mn10300.c egcc-CVS20020905/gcc/config/mn10300/mn10300.c
--- orig/egcc-CVS20020905/gcc/config/mn10300/mn10300.c 2002-07-16 22:54:10.000000000 -0400
+++ egcc-CVS20020905/gcc/config/mn10300/mn10300.c 2002-09-06 09:09:34.670598213 -0400
@@ -1141,7 +1141,7 @@ mask_ok_for_mem_btst (len, bit)
int len;
int bit;
{
- int mask = 0;
+ unsigned int mask = 0;
while (len > 0)
{