【发布时间】:2012-07-25 09:07:09
【问题描述】:
我想知道为什么这会编译:
int test();
int main() { return test((void*)0x1234); }
int test(void* data) { return 0; }
为什么编译器不会发出任何错误/警告(我尝试过 clang,gcc)? 如果我更改返回值,它将无法编译 - 但参数可能不同?!
【问题讨论】:
-
C void arguments的可能重复
标签: c