RFA: Fix debug fprintf in avr.c

Nick Clifton nickc@redhat.com
Tue Jul 19 14:47:00 GMT 2005


Hi Denis, Hi Marek,

  Please may I have permission to apply the small patch below ?

  It fixes the debug statement in avr.c:legitimate_address_p so that
  the character printed for the return value is a number and not some
  ASCII control character.

Cheers
  Nick

gcc/ChangeLog
2005-07-19  Nick Clifton  <nickc@redhat.com>

	* config/avr/avr.c (legitimate_address_p): Fix debugging print
	statement to avoid displaying ASCII control characters.

Index: gcc/config/avr/avr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/avr/avr.c,v
retrieving revision 1.139
diff -c -3 -p -r1.139 avr.c
*** gcc/config/avr/avr.c	2 Jul 2005 13:19:24 -0000	1.139
--- gcc/config/avr/avr.c	19 Jul 2005 14:42:01 -0000
*************** legitimate_address_p (enum machine_mode 
*** 950,956 ****
      }
    if (TARGET_ALL_DEBUG)
      {
!       fprintf (stderr, "   ret = %c\n", r);
      }
    return r == NO_REGS ? 0 : (int)r;
  }
--- 950,956 ----
      }
    if (TARGET_ALL_DEBUG)
      {
!       fprintf (stderr, "   ret = %c\n", r + '0');
      }
    return r == NO_REGS ? 0 : (int)r;
  }



More information about the Gcc-patches mailing list