Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr38957.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR c/38957 */ |
2 /* { dg-do compile } */ | |
3 | |
4 char * | |
5 foo (void) | |
6 { | |
7 char a[2]; | |
8 return a+1; /* { dg-warning "returns address of local variable" } */ | |
9 } | |
10 | |
11 char * | |
12 bar (void) | |
13 { | |
14 char a[2]; | |
15 return a; /* { dg-warning "returns address of local variable" } */ | |
16 } |