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
> *** gcc.c-torture/execute/20010925-1.c.original Tue Jan 28 18:27:22 2003
> --- gcc.c-torture/execute/20010925-1.c.modified Tue Jan 28 18:27:55 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,9 ----
> + #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.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu