This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: folding STRING_CST + INTEGER_CST
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Tue, 25 Jun 2002 10:15:14 +0100 (BST)
- Subject: Re: folding STRING_CST + INTEGER_CST
On Mon, 24 Jun 2002, Aldy Hernandez wrote:
> another alternative is to fold STRING_CST+INTEGER_CST when we are
> building the trees for certain builtins accepting "const char *".
> the following come to mind:
>
> strspn, strstr, strcspn, strrchr, strchr, index, fputs
>
> ...since we know we don't need equality operations on them.
Some of these functions return pointers into their arguments, which may
then get compared afterwards.
--
Joseph S. Myers
jsm28@cam.ac.uk