OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [pr19967.c] - Blame information for rev 20

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* PR middle-end/19967
2
   These functions mentioned below are supposed to return char *.
3
   However, fold_builtin_... had bugs that caused the return types to
4
   be const char *.  */
5
 
6
/* { dg-do compile } */
7
/* { dg-options "-pedantic" } */
8
 
9
char *strchr(const char *, int);
10
char *strrchr(const char *, int);
11
char *index(const char *, int);
12
char *rindex(const char *, int);
13
char *strpbrk(const char *, const char *);
14
char *strstr(const char *, const char *);
15
char *p;
16
 
17
void
18
f (void)
19
{
20
  p = strchr(__func__, 'f');
21
  p = strrchr(__func__, 'f');
22
  p = index(__func__, 'f');
23
  p = rindex(__func__, 'f');
24
  p = strpbrk(__func__, "f");
25
  p = strstr(__func__, "f");
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.