Con*_*tor 6 c++ gcc compiler-bug c++11 c++14
下面的代码编译罚款与铛3.5.0,但不进行编译GCC 4.9.0(带-Wall -Wextra -pedantic-errors
标志和任何的-std=c++03
,-std=c++11
和-std=c++14
标志):
struct S
{
S(const float(&)[12])
{
}
};
float v[12];
S f()
{
return v;
}
int main()
{
}
Run Code Online (Sandbox Code Playgroud)
MS VC 2013也 编译了这段代码.
哪种编译器是正确的,什么是符合标准的行为?
归档时间: |
|
查看次数: |
99 次 |
最近记录: |