Why can't I cast a function pointer to (void *)?
I have a function that takes a string, an array of strings, and an array of pointers, and looks for the string in the array of strings, and returns the corresponding pointer from the array of pointers. Since I use this for several different things, the pointer array is declared as an array of (void *), and the caller should know what kind of pointers are actually there (and hence what kind of a pointer it gets back as the return value). When I pass in an array of function pointers, however, I get a warning when I compile with -Wpedantic : clang: test.c:40:8: warning: assigning to 'voidfunc'