使用时gcc,代码:
register a = 3;
static b = 3;
Run Code Online (Sandbox Code Playgroud)
-std=c89 -pedantic-errors虽然有警告,但在使用旗帜时允许使用它.
但是它会收到-std=c99 -pedantic-errors标志错误.
我想知道C89标准的哪一部分允许"隐含整数"规则?
我一直以为在C中int代表signed int; 但我听说这种行为是特定于平台的,在某些平台上int是unsigned默认的.这是真的吗?什么说标准,并随着时间的推移而演变?
为什么以下程序不会抛出错误:
dfljshfksdhfl;
#include <stdio.h>
int main () {
return 0;
}
Run Code Online (Sandbox Code Playgroud)
gcc 只会发出警告:
test.c:1:1:警告:数据定义没有类型或存储类[默认启用]