OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr35652.c
1 /* PR c++/35652: wrong location and duplicated warning.
2  { dg-do compile }
3  { dg-options "" } */
4 int bar()
5 {
6   const char *s = 'z' + "y"; /* { dg-warning "offset '122' outside bounds of constant string" } */
7 }
8
9 int g()
10 {
11   char str[2];
12   const char *p = str + sizeof(str);
13 }