嗨,大家好!今天打算给大家分享一下ISO 26262中关于失效的概念,这也是功能安全所围绕的核心问题。
#### 首先,什么是失效呢?
*Failure:termination of an intended behavior of an element or an item due to fault manifestation* (ISO 26262:2018版第一部分,第三章 3.50)
失效:由于(永久的/暂时的)故障显现而导....
相信大家写业务逻辑的时候,都是面向if、else、for、while、switch编程。但是你见过switch嵌套do..while吗?
## 先上代码
```
void send( int * to, int * from, int count)
{
int n = (count + 7 ) / 8 ;
switch (count % 8 ) {
case 0 : do { * to ++ = * from ++ ;
case 7 : * to ++ = * fr...
## 引入主题,看代码
我们先来看看以下程序
```cpp
//编译器:https://tool.lu/coderunner/
//来源:技术让梦想更伟大
//作者:李肖遥
#include
using namespace std;
struct st1
{
char a ;
int b ;
short c ;
};
struct st2
{
short c ;
char a ;
int b ;
};
```
编译的结果如下:
![](https://IMG_UR...