☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
c-c++-common
/
Wdangling-pointer-10.c
☽
☼
gcc/testsuite/c-c++-common/Wdangling-pointer-10.c
code
plain
raw
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wdangling-pointer" } */
3
4
struct S {
5
int x;
6
};
7
8
void g (int **p)
9
{
10
struct S s = {};
11
*p = &s.x; /* { dg-warning "address of local variable" } */
12
}