[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr38957.c
blobf94cd7627b4a6540531171f9afb2daa1c3a9b46c
1 /* PR c/38957 */
2 /* { dg-do compile } */
4 char *
5 foo (void)
7 char a[2];
8 return a+1; /* { dg-warning "returns address of local variable" } */
11 char *
12 bar (void)
14 char a[2];
15 return a; /* { dg-warning "returns address of local variable" } */