Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
全部都想学怎么办
CppCoreGuidelines
提交
3b93c16f
C
CppCoreGuidelines
项目概览
全部都想学怎么办
/
CppCoreGuidelines
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
CppCoreGuidelines
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3b93c16f
编写于
4月 24, 2016
作者:
A
Andrew Pardoe
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #596 from tkruse/style-fix27
Style fix27
上级
e54a7796
122ce835
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
96 addition
and
92 deletion
+96
-92
CppCoreGuidelines.md
CppCoreGuidelines.md
+96
-92
未找到文件。
CppCoreGuidelines.md
浏览文件 @
3b93c16f
...
...
@@ -6868,6 +6868,7 @@ Union rule summary:
##### Example
???
##### Enforcement
...
...
@@ -6878,6 +6879,7 @@ Union rule summary:
##### Reason
Naked unions are a source of type errors.
**Alternative**: Wrap them in a class together with a type field.
...
...
@@ -6888,6 +6890,8 @@ Naked unions are a source of type errors.
???
##### Enforcement
???
...
...
@@ -10405,7 +10409,7 @@ Not all data races are as easy to spot as this one.
}
Now, a compiler that does not know that `val` can change will most likely implement that `switch` using a jump table with five entries.
Then, a `val` outside the
[0..4]
range will cause a jump to an address that could be anywhere in the program, and execution would proceed there.
Then, a `val` outside the
`[0..4]`
range will cause a jump to an address that could be anywhere in the program, and execution would proceed there.
Really, "all bets are off" if you get a data race.
Actually, it can be worse still: by looking at the generated code you may be able to determine where the stray jump will go for a given value;
this can be a security risk.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录