1 /* PR c/38957 */ 2 /* { dg-do compile } */ 3 4 char * foo(void)5foo (void) 6 { 7 char a[2]; 8 return a+1; /* { dg-warning "returns address of local variable" } */ 9 } 10 11 char * bar(void)12bar (void) 13 { 14 char a[2]; 15 return a; /* { dg-warning "returns address of local variable" } */ 16 } 17