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]

Warnings patch


op_t needs to be a self-promoting type because it's used in a
prototype and a K&R function definition.

2000-05-03  Jason Merrill  <jason@casey.cygnus.com>

	* cppexp.c (op_t): Make an int.

	* rtlanal.c (dead_or_set_regno_p): Remove unused variable.

	* varasm.c (initializer_constant_valid_p): Fix parenthesis.

	* gensupport.c (process_rtx): Fix macros used.

Index: cppexp.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cppexp.c,v
retrieving revision 1.53
diff -c -p -r1.53 cppexp.c
*** cppexp.c	2000/05/01 18:20:10	1.53
--- cppexp.c	2000/05/03 17:59:52
*************** Boston, MA 02111-1307, USA.  */
*** 68,74 ****
     number with SUM's sign, where A, B, and SUM are all C integers.  */
  #define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0)
  
! typedef short op_t;
  
  static void integer_overflow PARAMS ((cpp_reader *));
  static HOST_WIDEST_INT left_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT,
--- 68,74 ----
     number with SUM's sign, where A, B, and SUM are all C integers.  */
  #define possible_sum_sign(a, b, sum) ((((a) ^ (b)) | ~ ((a) ^ (sum))) < 0)
  
! typedef int op_t;
  
  static void integer_overflow PARAMS ((cpp_reader *));
  static HOST_WIDEST_INT left_shift PARAMS ((cpp_reader *, HOST_WIDEST_INT,
Index: gensupport.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gensupport.c,v
retrieving revision 1.1
diff -c -p -r1.1 gensupport.c
*** gensupport.c	2000/05/03 17:45:26	1.1
--- gensupport.c	2000/05/03 17:59:52
*************** process_rtx (desc)
*** 92,99 ****
    
        /* Create a split with values from the insn_and_split. */
        rtx split = rtx_alloc (DEFINE_SPLIT);
!       XVEC (split, 0) = copy_rtx (XVEC (*desc, 1));
!       remove_constraints (XVEC (split, 0));
        split_cond = XSTR (split, 1) = XSTR (*desc, 4);
    
        /* If the split condition starts with "&&", append it to the
--- 92,99 ----
    
        /* Create a split with values from the insn_and_split. */
        rtx split = rtx_alloc (DEFINE_SPLIT);
!       XEXP (split, 0) = copy_rtx (XEXP (*desc, 1));
!       remove_constraints (XEXP (split, 0));
        split_cond = XSTR (split, 1) = XSTR (*desc, 4);
    
        /* If the split condition starts with "&&", append it to the
*************** process_rtx (desc)
*** 113,119 ****
    
        /* Fix up the DEFINE_INSN.  */
        PUT_CODE (*desc, DEFINE_INSN);
!       XVEC (*desc, 4) = XSTR (*desc, 7);
    
        /* Return the DEFINE_INSN part, and put the DEFINE_SPLIT
           in the queue.  */
--- 113,119 ----
    
        /* Fix up the DEFINE_INSN.  */
        PUT_CODE (*desc, DEFINE_INSN);
!       XVEC (*desc, 4) = XVEC (*desc, 7);
    
        /* Return the DEFINE_INSN part, and put the DEFINE_SPLIT
           in the queue.  */
Index: rtlanal.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/rtlanal.c,v
retrieving revision 1.58
diff -c -p -r1.58 rtlanal.c
*** rtlanal.c	2000/04/27 07:18:08	1.58
--- rtlanal.c	2000/05/03 17:59:56
*************** dead_or_set_regno_p (insn, test_regno)
*** 1231,1237 ****
       unsigned int test_regno;
  {
    unsigned int regno, endregno;
!   rtx link, pattern;
  
    /* See if there is a death note for something that includes TEST_REGNO.  */
    if (find_regno_note (insn, REG_DEAD, test_regno))
--- 1231,1237 ----
       unsigned int test_regno;
  {
    unsigned int regno, endregno;
!   rtx pattern;
  
    /* See if there is a death note for something that includes TEST_REGNO.  */
    if (find_regno_note (insn, REG_DEAD, test_regno))
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/varasm.c,v
retrieving revision 1.113
diff -c -p -r1.113 varasm.c
*** varasm.c	2000/05/03 13:20:48	1.113
--- varasm.c	2000/05/03 17:59:59
*************** initializer_constant_valid_p (value, end
*** 4068,4074 ****
        return null_pointer_node;
  
      case ADDR_EXPR:
!       return staticp (TREE_OPERAND (value, 0) ? TREE_OPERAND (value, 0) : 0);
  
      case NON_LVALUE_EXPR:
        return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype);
--- 4068,4074 ----
        return null_pointer_node;
  
      case ADDR_EXPR:
!       return staticp (TREE_OPERAND (value, 0)) ? TREE_OPERAND (value, 0) : 0;
  
      case NON_LVALUE_EXPR:
        return initializer_constant_valid_p (TREE_OPERAND (value, 0), endtype);

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