这取决于你如何调用gcc:
/tmp/c$ gcc -Wall bad.c bad.c:1: warning: return type defaults to ‘int’ bad.c: In function ‘main’: bad.c:1: warning: control reaches end of non-void function
VS
/tmp/c$ gcc -Wall /tmp/c/bad.c /tmp/c/bad.c:1: warning: return type defaults to ‘int’ /tmp/c/bad.c: In function ‘main’: /tmp/c/bad.c:1: warning: control reaches end of non-void function
VS
/tmp/c$ gcc -Wall ../../tmp/c/bad.c ../../tmp/c/bad.c:1: warning: return type defaults to ‘int’ ../../tmp/c/bad.c: In function ‘main’: ../../tmp/c/bad.c:1: warning: control reaches end of non-void function
bad.c的内容只是
main() { }
Run Code Online (Sandbox Code Playgroud)
如果有人关心.
| 归档时间: |
|
| 查看次数: |
3406 次 |
| 最近记录: |