aCC编译器
编译标准库的代码
代码中若有标准库的代码, 需要加-AA选项.
文件末尾的空行
非空源文件的末尾必须以空行结束, 否则编译时报错.
cc编译器
storage class specifier
请看以下代码:
//file: a.c
#include <stdio.h>
static void f();
void f() {
//
}
int main(int argc, char const *argv[])
{
f();
return 0;
}
cc编译器警告(不应该产生这种警告啊!):
~/src/> cc a.c
cc: "a.c", line 6: warning 562: Redeclaration of "f" with a different storage class specifier: "f" will have internal linkage.
定义函数f时指定static限制符, 可消除该警告:
static void f();
static void f() {
//
}