This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: find_regno_partial, remove warnings, fix indentation
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: 11 Dec 2001 12:37:16 -0800
- Subject: patch: find_regno_partial, remove warnings, fix indentation
i'm tired of the enum warnings. i've added a default.
the switch was also indented incorrectly.
installed as obvious.
2001-12-11 Aldy Hernandez <aldyh@redhat.com>
* flow.c (find_regno_partial): Indent properly. Add a default to
switch.
Index: flow.c
===================================================================
RCS file: /cvs/uberbaum/gcc/flow.c,v
retrieving revision 1.496
diff -c -p -r1.496 flow.c
*** flow.c 2001/12/09 20:13:03 1.496
--- flow.c 2001/12/11 20:10:43
*************** find_regno_partial (ptr, data)
*** 1322,1345 ****
switch (GET_CODE (*ptr))
{
! case ZERO_EXTRACT:
! case SIGN_EXTRACT:
! case STRICT_LOW_PART:
! if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
! {
! param->retval = XEXP (*ptr, 0);
! return 1;
! }
! break;
! case SUBREG:
! if (GET_CODE (SUBREG_REG (*ptr)) == REG
! && REGNO (SUBREG_REG (*ptr)) == reg)
! {
! param->retval = SUBREG_REG (*ptr);
! return 1;
! }
! break;
}
return 0;
--- 1322,1348 ----
switch (GET_CODE (*ptr))
{
! case ZERO_EXTRACT:
! case SIGN_EXTRACT:
! case STRICT_LOW_PART:
! if (GET_CODE (XEXP (*ptr, 0)) == REG && REGNO (XEXP (*ptr, 0)) == reg)
! {
! param->retval = XEXP (*ptr, 0);
! return 1;
! }
! break;
! case SUBREG:
! if (GET_CODE (SUBREG_REG (*ptr)) == REG
! && REGNO (SUBREG_REG (*ptr)) == reg)
! {
! param->retval = SUBREG_REG (*ptr);
! return 1;
! }
! break;
!
! default:
! break;
}
return 0;