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

禁止函数隐式转换为指针

函数隐式转换为指针
test.c
1#include <stdlib.h>
2
3void foo(int x);
4
5void bar(void)
6{
7 if (foo == NULL)
禁止函数隐式转换为指针 [gjb8114-r-1-3-2]
8 return;
9 void (*p) (int) = foo;
禁止函数隐式转换为指针 [gjb8114-r-1-3-2]
10}
函数取址为指针
test.c
1#include <stdlib.h>
2
3void foo(int x);
4
5void bar(void)
6{
7 if (&foo == NULL)
8 return;
9 void (*p) (int) = &foo;
10}