PATCH: Support for Pascal strings -- Take 3

Jakub Jelinek jakub@redhat.com
Tue Jul 3 05:47:00 GMT 2001


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



More information about the Gcc-patches mailing list