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]

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


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