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: PATCH: Support for Pascal strings -- Take 3


On Tue, Jul 03, 2001 at 10:42:49PM +1000, Fergus Henderson wrote:
> On 02-Jul-2001, Ziemowit Laski <zlaski@apple.com> wrote:
> > Index: gcc/testsuite/g++.dg/pascal-strings-1.C
> ...
> > + extern "C" void abort (void);
> > + extern "C" long unsigned strlen (const char *s);
> 
> That's not standard-conforming C++...
> why not just use #include <stdlib.h> and #include <string.h>?

IMHO testcases should try hard to avoid including any headers, because then
they are not exactly minimal testcases (which are easier to debug).
I think just
typedef __SIZE_TYPE__ size_t;
extern "C" size_t strlen (const char *s);

should be enough.

	Jakub


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