This is the mail archive of the
mailing list for the GCC project.
Re: string.h and std_cstring.h
- From: Joe Buck <Joe dot Buck at synopsys dot com>
- To: gp at qnx dot com (Graeme Peterson)
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 2 Aug 2002 15:10:44 -0700 (PDT)
- Subject: Re: string.h and std_cstring.h
> I am working on the QNX i386-nto support in gcc again.
> The current stumbling block is that our string.h declares
> memchr, strchr, strpbrk, strrchr, and strstr as inline.
> Comments? Am I missing something?
It sounds like you may be running into trouble because C++ requires
overloading for certain functions. For example, in C, strchr is
char* strrchr(const char *, int);
while in C++ there are two:
const char* strrchr(const char *, int);
char* strrchr(char *, int);
So, if your OS provides only a C version of strchr, you still have
work to do to get the C++ versions right.