Why is an assignment without '&' compiled in the following code? I compiled the code with GCC 3.4.6. Is assignment correct without &, or is it a “function” of GCC?
void func() {
}
int main() {
typedef void (*F)();
F f;
f = &func;
f = func;
(*f)();
return 0;
}
source
share