指针使用R-1-3-4强制

禁止返回局部变量地址

返回局部变量地址
test.c
1int* foo(void)
2{
3 int tmp = 0;
4 return &tmp;
禁止返回局部变量地址 [gjb8114-r-1-3-4]
5}
返回全局变量地址
test.c
1int the_var = 0;
2int* foo(void)
3{
4 return &the_var;
5}