我在c99标准中阅读到:
-remove implicit function declaration,
-remove implicit int.
但是当我尝试使用gcc编译器以c99模式并带有-pedantic参数来编译这段代码时
main(void){
f(3);
return 0;
}
int f(int a){
....
}
我预计会出现两个错误,但是我只收到了两个警告:
-warning: return type defaults to ‘int’
-warning: implicit declaration of function ‘f’.
在 C99 中不应该出现这些错误吗?
http://gcc.gnu.org/c99status.html 在两种情况下都写着“完成”。
谢谢。