-
4 votesanswersviews
可以通过标记变量volatile来修复不安全类型的惩罚吗?
在zwol对Is it legal to implement inheritance in C by casting pointers between one struct that is a subset of another rather than first member?的回答中,他给出了一个例子,说明为什么类似结构之间的简单类型转换是不安全的,并且在注释中有一个样本环境,它在其中出现意外...