forked from checkedc/checkedc-clang
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
benchmark failureA bug causing a failure in our nightly benchmark testsA bug causing a failure in our nightly benchmark testsfunction pointertypedef
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).
Metadata
Metadata
Assignees
Labels
benchmark failureA bug causing a failure in our nightly benchmark testsA bug causing a failure in our nightly benchmark testsfunction pointertypedef