This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Minor warning removal / cleanup changes


Tetsed on alphaev56-dec-osf4.0c.

Sat Jan 12 08:54:51 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* diagnostic.c (warn_deprecated_use): Rework to lower indentation.
	* expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for
	offsets, and change line folding.
	* optabs.c (expand_binop): Remove warnings.
	* sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning.
	
*** diagnostic.c	2002/01/12 13:45:38	1.75
--- diagnostic.c	2002/01/12 13:52:15
*************** warn_deprecated_use (node)
*** 1526,1565 ****
       tree node;
  {
!   if (node && warn_deprecated_decl)
      {
!       if (DECL_P (node))
!         {
! 	  warning ("`%s' is deprecated (declared at %s:%d)",
! 		   IDENTIFIER_POINTER (DECL_NAME (node)),
! 		   DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
!         }
!       else if (TYPE_P (node))
!         {
!       	  const char *what = NULL;
! 	  tree decl = TYPE_STUB_DECL (node);
!       	
! 	  if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
! 	    what = IDENTIFIER_POINTER (TYPE_NAME (node));
! 	  else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
! 		   && DECL_NAME (TYPE_NAME (node)))
! 	    what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
  	
! 	  if (what)
! 	    {
! 	      if (decl)
! 	        warning ("`%s' is deprecated (declared at %s:%d)", what,
! 		         DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
! 	      else
! 	        warning ("`%s' is deprecated", what);
! 	    }
  	  else
! 	    {
! 	      if (decl)
! 	        warning ("type is deprecated (declared at %s:%d)",
! 		         DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
! 	      else
! 	        warning ("type is deprecated");
! 	    }
!         }
      }
  }
--- 1526,1560 ----
       tree node;
  {
!   if (node == 0 || !warn_deprecated_decl)
!     return;
! 
!   if (DECL_P (node))
!     warning ("`%s' is deprecated (declared at %s:%d)",
! 	     IDENTIFIER_POINTER (DECL_NAME (node)),
! 	     DECL_SOURCE_FILE (node), DECL_SOURCE_LINE (node));
!   else if (TYPE_P (node))
      {
!       const char *what = NULL;
!       tree decl = TYPE_STUB_DECL (node);
! 
!       if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
! 	what = IDENTIFIER_POINTER (TYPE_NAME (node));
!       else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
! 	       && DECL_NAME (TYPE_NAME (node)))
! 	what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
  	
!       if (what)
! 	{
! 	  if (decl)
! 	    warning ("`%s' is deprecated (declared at %s:%d)", what,
! 		     DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
  	  else
! 	    warning ("`%s' is deprecated", what);
! 	}
!       else if (decl)
! 	warning ("type is deprecated (declared at %s:%d)",
! 		 DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
!       else
! 	warning ("type is deprecated");
      }
  }
*** expr.c	2002/01/11 23:48:06	1.411
--- expr.c	2002/01/12 13:52:24
*************** emit_move_insn_1 (x, y)
*** 2792,2796 ****
    enum machine_mode submode;
    enum mode_class class = GET_MODE_CLASS (mode);
-   unsigned int i;
  
    if ((unsigned int) mode >= (unsigned int) MAX_MACHINE_MODE)
--- 2792,2795 ----
*************** emit_move_insn_1 (x, y)
*** 2818,2825 ****
  	 push exactly, we need to use move instructions.  */
        if (stack
! 	  && PUSH_ROUNDING (GET_MODE_SIZE (submode)) != GET_MODE_SIZE (submode))
  	{
  	  rtx temp;
! 	  int offset1, offset2;
  
  	  /* Do not use anti_adjust_stack, since we don't want to update
--- 2817,2825 ----
  	 push exactly, we need to use move instructions.  */
        if (stack
! 	  && (PUSH_ROUNDING (GET_MODE_SIZE (submode))
! 	      != GET_MODE_SIZE (submode)))
  	{
  	  rtx temp;
! 	  HOST_WIDE_INT offset1, offset2;
  
  	  /* Do not use anti_adjust_stack, since we don't want to update
*************** emit_move_insn_1 (x, y)
*** 2833,2842 ****
  			       stack_pointer_rtx,
  			       GEN_INT
! 				 (PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x)))),
! 			       stack_pointer_rtx,
! 			       0,
! 			       OPTAB_LIB_WIDEN);
  	  if (temp != stack_pointer_rtx)
  	    emit_move_insn (stack_pointer_rtx, temp);
  #ifdef STACK_GROWS_DOWNWARD
  	  offset1 = 0;
--- 2833,2843 ----
  			       stack_pointer_rtx,
  			       GEN_INT
! 				 (PUSH_ROUNDING
! 				  (GET_MODE_SIZE (GET_MODE (x)))),
! 			       stack_pointer_rtx, 0, OPTAB_LIB_WIDEN);
! 
  	  if (temp != stack_pointer_rtx)
  	    emit_move_insn (stack_pointer_rtx, temp);
+ 
  #ifdef STACK_GROWS_DOWNWARD
  	  offset1 = 0;
*************** emit_move_insn_1 (x, y)
*** 2847,2850 ****
--- 2848,2852 ----
  		     + GET_MODE_SIZE (submode));
  #endif
+ 
  	  emit_move_insn (change_address (x, submode,
  					  gen_rtx_PLUS (Pmode,
*************** emit_move_insn_1 (x, y)
*** 2902,2907 ****
  	      && (reload_in_progress | reload_completed) == 0)
  	    {
! 	      int packed_dest_p = (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER);
! 	      int packed_src_p  = (REG_P (y) && REGNO (y) < FIRST_PSEUDO_REGISTER);
  
  	      if (packed_dest_p || packed_src_p)
--- 2904,2911 ----
  	      && (reload_in_progress | reload_completed) == 0)
  	    {
! 	      int packed_dest_p
! 		= (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER);
! 	      int packed_src_p
! 		= (REG_P (y) && REGNO (y) < FIRST_PSEUDO_REGISTER);
  
  	      if (packed_dest_p || packed_src_p)
*************** emit_move_insn_1 (x, y)
*** 2925,2928 ****
--- 2929,2933 ----
  			{
  			  rtx sreg = gen_rtx_SUBREG (reg_mode, x, 0);
+ 
  			  emit_move_insn_1 (cmem, y);
  			  return emit_move_insn_1 (sreg, mem);
*************** emit_move_insn_1 (x, y)
*** 2931,2934 ****
--- 2936,2940 ----
  			{
  			  rtx sreg = gen_rtx_SUBREG (reg_mode, y, 0);
+ 
  			  emit_move_insn_1 (mem, sreg);
  			  return emit_move_insn_1 (x, cmem);
*************** emit_move_insn_1 (x, y)
*** 2951,2957 ****
  	      && (GET_CODE (realpart_x) == SUBREG
  		  || GET_CODE (imagpart_x) == SUBREG))
! 	    {
! 	      emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
! 	    }
  
  	  emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
--- 2957,2961 ----
  	      && (GET_CODE (realpart_x) == SUBREG
  		  || GET_CODE (imagpart_x) == SUBREG))
! 	    emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
  
  	  emit_insn (GEN_FCN (mov_optab->handlers[(int) submode].insn_code)
*************** emit_move_insn_1 (x, y)
*** 2972,2975 ****
--- 2976,2980 ----
        rtx seq, inner;
        int need_clobber;
+       int i;
  
  #ifdef PUSH_ROUNDING
*************** emit_move_insn_1 (x, y)
*** 2992,3008 ****
  			       stack_pointer_rtx,
  			       GEN_INT
! 				 (PUSH_ROUNDING (GET_MODE_SIZE (GET_MODE (x)))),
! 			       stack_pointer_rtx,
! 			       0,
! 			       OPTAB_LIB_WIDEN);
            if (temp != stack_pointer_rtx)
              emit_move_insn (stack_pointer_rtx, temp);
  
  	  code = GET_CODE (XEXP (x, 0));
  	  /* Just hope that small offsets off SP are OK.  */
  	  if (code == POST_INC)
  	    temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, 
! 				GEN_INT (-(HOST_WIDE_INT)
! 					   GET_MODE_SIZE (GET_MODE (x))));
  	  else if (code == POST_DEC)
  	    temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, 
--- 2997,3014 ----
  			       stack_pointer_rtx,
  			       GEN_INT
! 				 (PUSH_ROUNDING
! 				  (GET_MODE_SIZE (GET_MODE (x)))),
! 			       stack_pointer_rtx, 0,& OPTAB_LIB_WIDEN);
! 
            if (temp != stack_pointer_rtx)
              emit_move_insn (stack_pointer_rtx, temp);
  
  	  code = GET_CODE (XEXP (x, 0));
+ 
  	  /* Just hope that small offsets off SP are OK.  */
  	  if (code == POST_INC)
  	    temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, 
! 				GEN_INT (-((HOST_WIDE_INT)
! 					   GET_MODE_SIZE (GET_MODE (x)))));
  	  else if (code == POST_DEC)
  	    temp = gen_rtx_PLUS (Pmode, stack_pointer_rtx, 
*************** emit_move_insn_1 (x, y)
*** 3063,3069 ****
  	  && ! (reload_in_progress || reload_completed)
  	  && need_clobber != 0)
! 	{
! 	  emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
! 	}
  
        emit_insn (seq);
--- 3069,3073 ----
  	  && ! (reload_in_progress || reload_completed)
  	  && need_clobber != 0)
! 	emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
  
        emit_insn (seq);
*** optabs.c	2002/01/10 10:21:27	1.121
--- optabs.c	2002/01/12 13:52:29
*************** expand_binop (mode, binoptab, op0, op1, 
*** 896,900 ****
        && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       unsigned int i;
        rtx insns;
        rtx equiv_value;
--- 896,900 ----
        && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       int i;
        rtx insns;
        rtx equiv_value;
*************** expand_binop (mode, binoptab, op0, op1, 
*** 1187,1191 ****
        && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       unsigned int i;
        optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
        unsigned int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
--- 1187,1191 ----
        && binoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       int i;
        optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
        unsigned int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
*************** expand_unop (mode, unoptab, op0, target,
*** 2177,2181 ****
        && unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       unsigned int i;
        rtx insns;
  
--- 2177,2181 ----
        && unoptab->handlers[(int) word_mode].insn_code != CODE_FOR_nothing)
      {
!       int i;
        rtx insns;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]