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]

Re: divmod-1.c patch (promoting problem)


On 21 Aug 2001 16:13:58 -0700, Richard Henderson wrote:
> On Tue, Aug 21, 2001 at 04:58:43PM +0300, Aldy Hernandez wrote:
> > here's a patch to fix the testcase and add the prototypes.
> 
> Go ahead and convert the entire test case to proper ISO C
> prototyped declarations.  I.e.

ok here's the patch.  installing.

-- 
Aldy Hernandez					E-mail: aldyh@redhat.com
Professional Gypsy and Camel Trader
Red Hat, Inc.

2001-08-21  Aldy Hernandez  <aldyh@redhat.com>

        * gcc.c-torture/execute/divmod-1.c: Convert to ANSI.

Index: divmod-1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.c-torture/execute/divmod-1.c,v
retrieving revision 1.3
diff -c -p -r1.3 divmod-1.c
*** divmod-1.c	2000/09/21 17:30:11	1.3
--- divmod-1.c	2001/08/22 10:17:28
***************
*** 1,67 ****
! div1 (x)
!      signed char x;
  {
    return x / -1;
  }
  
! div2 (x)
!      signed short x;
  {
    return x / -1;
  }
  
! div3 (x, y)
!      signed char x;
!      signed char y;
  {
    return x / y;
  }
  
! div4 (x, y)
!      signed short x;
!      signed short y;
  {
    return x / y;
  }
  
! mod1 (x)
!      signed char x;
  {
    return x % -1;
  }
  
! mod2 (x)
!      signed short x;
  {
    return x % -1;
  }
  
! mod3 (x, y)
!      signed char x;
!      signed char y;
  {
    return x % y;
  }
  
! mod4 (x, y)
!      signed short x;
!      signed short y;
  {
    return x % y;
  }
  
  signed long
! mod5 (x, y)
!      signed long x;
!      signed long y;
  {
    return x % y;
  }
       
  unsigned long
! mod6 (x, y)
!      unsigned long x;
!      unsigned long y;
  {
    return x % y;
  }
--- 1,51 ----
! div1 (signed char x)
  {
    return x / -1;
  }
  
! div2 (signed short x)
  {
    return x / -1;
  }
  
! div3 (signed char x, signed char y)
  {
    return x / y;
  }
  
! div4 (signed short x, signed short y)
  {
    return x / y;
  }
  
! mod1 (signed char x)
  {
    return x % -1;
  }
  
! mod2 (signed short x)
  {
    return x % -1;
  }
  
! mod3 (signed char x, signed char y)
  {
    return x % y;
  }
  
! mod4 (signed short x, signed short y)
  {
    return x % y;
  }
  
  signed long
! mod5 (signed long x, signed long y)
  {
    return x % y;
  }
       
  unsigned long
! mod6 (unsigned long x, unsigned long y)
  {
    return x % y;
  }


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