This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [patch] gcc.c-torture/execute/20010925-1.c
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Jan 2003 20:15:59 +0530
- Subject: RE: [patch] gcc.c-torture/execute/20010925-1.c
Hi Kaveh,
> > + #include <string.h>
> > +
> > extern void exit(int);
> > extern void abort (void);
> >
> > ! extern void * memcpy (void *, const void *, size_t);
> > int foo (void *, void *, unsigned int c);
> >
> > int src[10];
>
>Rather than introduce an include file dependency, IMHO you should use
>GCC's builtin __SIZE_TYPE__. E.g.
>
> > extern void * memcpy (void *, const void *, __SIZE_TYPE__);
>
>and don't bother with the header file string.h. That keeps the
>testcase self-contained.
Thanks for that suggestion. BTW, that would render the testcase
non-portable, but, I guess, thats OK. This is a GCC test-suite,
anyways. ;-)
The new patch is given below.
Regards,
Venky
--------------------- Change Log entry ----------------------------
2003-01-28 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
* gcc.c-torture/execute/20010925-1.c: Changed the
memcpy declaration.
------------------------------ Patch ------------------------------
*** gcc.c-torture/execute/20010925-1.c.original Tue Sep 25 17:22:13 2001
--- gcc.c-torture/execute/20010925-1.c.modified Tue Jan 28 20:25:34 2003
***************
*** 1,7 ****
extern void exit(int);
extern void abort (void);
! extern void * memcpy (void *, const void *, unsigned int);
int foo (void *, void *, unsigned int c);
int src[10];
--- 1,7 ----
extern void exit(int);
extern void abort (void);
! extern void * memcpy (void *, const void *, __SIZE_TYPE__);
int foo (void *, void *, unsigned int c);
int src[10];