Open
Description
In this simplification of a vsftpd error:
typedef void (*fp)(int *i); // given checked type
void simplefunc(int *i) {
i = (int*)1; // unsafe - function will not be _Checked
}
void test(void) {
fp func = simplefunc; // fail compilation: assign unchecked to checked
}
3C completes but clang won't accept the function pointer initialization in test
. If simplefunc
were checked, or even declared but undefined, clang would accept it. This may be another case for having an unchecked variant of a typedef (see #389).