Mel*_*lon 5 c compiler-construction gcc
我想知道来自编译器的这个消息是否应该仔细考虑.
我们来看看以下代码:
struct s
{
int a;
int b[];
};
void fun(struct s c)
{
}
int main()
{
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这给出了以下错误:
main.c:7:6: note: the ABI of passing struct with a flexible array member has changed in GCC 4.4
Run Code Online (Sandbox Code Playgroud)
我的问题是:在更大的项目中安全使用这种结构吗?这种结构可能带来的风险和影响是什么(除了编译器消息)?