This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] strlenopt improvements
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 2 Nov 2011 13:49:07 +0100
- Subject: Re: [PATCH] strlenopt improvements
- References: <20111024171514.GA3187@bart> <201111021341.31086.ebotcazou@adacore.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 02, 2011 at 01:41:30PM +0100, Eric Botcazou wrote:
> > 2011-10-24 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
> >
> > * gcc.dg/strlenopt-22.c: New testcase.
>
> This doesn't link if you don't have stpcpy in the libc, e.g. on Solaris.
>
> Here's an excerpt from the Linux man pages:
>
> CONFORMING TO
> This function is not part of the C or POSIX.1 standards, and is not
> customary on Unix systems, but is not a GNU invention either. Perhaps
> it comes from MS-DOS.
The man page is outdated, stpcpy is a standard POSIX2008 function.
Anyway, in the other gcc.dg/strlenopt-* testcases for USE_GNU I was using
the convention that the name ended with g (i.e. strlenopt-22g.c) and
the test would start with:
/* This test needs runtime that provides stpcpy function. */
/* { dg-do run { target *-*-linux* } } */
instead of just
/* { dg-do run } */
Jakub