File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " C/C++ 安全规则集合" ,
3
- "version" : " 1.1.1 " ,
3
+ "version" : " 1.2.0 " ,
4
4
"encoding" : " utf-8" ,
5
5
6
6
"//" : [
Original file line number Diff line number Diff line change 1
1
<img src =" logo.png " align =" right " />
2
2
3
- # C/C++ 安全规则集合 ![ Version] ( https://img.shields.io/badge/version-1.1.1 -brightgreen )
3
+ # C/C++ 安全规则集合 ![ Version] ( https://img.shields.io/badge/version-1.2.0 -brightgreen )
4
4
5
5
> Bjarne Stroustrup: “* C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off.* ”
6
6
@@ -3082,7 +3082,7 @@ const char* foo() {
3082
3082
return M("x", "y"); // Non-compliant
3083
3083
}
3084
3084
```
3085
- 在早期标准 (ISO 9899:1990)对这种情况没有明确定义,后续标准对其进行了约束,但 MSVC 等编译器至今仍不把这种问题视作编译错误,需要特别注意。
3085
+ 早期标准 (ISO 9899:1990)对这种情况没有明确定义,后续标准对其进行了约束,但 MSVC 等编译器至今仍不把这种问题视作编译错误,需要特别注意。
3086
3086
<br />
3087
3087
<br />
3088
3088
Original file line number Diff line number Diff line change 1
1
<img src =" logo.png " align =" right " />
2
2
3
- # 附录:C 未定义行为成因列表 ![ Version] ( https://img.shields.io/badge/version-1.1.1 -brightgreen )
3
+ # 附录:C 未定义行为成因列表 ![ Version] ( https://img.shields.io/badge/version-1.2.0 -brightgreen )
4
4
5
5
&emsp ;&emsp ; 未定义的行为(Undefined Behavior),指程序不可预测的执行效果,一般由错误的代码实现引起。出于效率、兼容性等多方面原因,语言标准不便于定义错误程序的明确行为,而是将其统称为“未定义”的行为,可以是崩溃,也可以是非预期的任意表现,有些问题在编译器和执行环境的特殊处理下也可能不会造成实质性的危害,但不具备可移植性。代码质量管理的一个重要目标就是消除会导致未定义行为的代码。
6
6
Original file line number Diff line number Diff line change 1
1
<img src =" logo.png " align =" right " />
2
2
3
- # 附录:C++ 未定义行为成因列表 ![ Version] ( https://img.shields.io/badge/version-1.1.1 -brightgreen )
3
+ # 附录:C++ 未定义行为成因列表 ![ Version] ( https://img.shields.io/badge/version-1.2.0 -brightgreen )
4
4
5
5
&emsp ;&emsp ; 未定义的行为(Undefined Behavior),指程序不可预测的执行效果,一般由错误的代码实现引起。出于效率、兼容性等多方面原因,语言标准不便于定义错误程序的明确行为,而是将其统称为“未定义”的行为,可以是崩溃,也可以是非预期的任意表现,有些问题在编译器和执行环境的特殊处理下也可能不会造成实质性的危害,但不具备可移植性。代码质量管理的一个重要目标就是消除会导致未定义行为的代码。
6
6
You can’t perform that action at this time.
0 commit comments