2018-03-18 22:05:31 +01:00
|
|
|
// #8441
|
|
|
|
class C {
|
|
|
|
int a;
|
|
|
|
int b;
|
2021-03-25 08:25:43 +01:00
|
|
|
C(void) : a(1), b(1) { c; }
|
2018-03-18 22:05:31 +01:00
|
|
|
};
|
|
|
|
|
2019-11-13 20:36:31 +01:00
|
|
|
class misra_21_1_C {
|
|
|
|
public:
|
2021-03-25 08:25:43 +01:00
|
|
|
misra_21_1_C operator=(const misra_21_1_C &); // 8.2
|
2019-11-13 20:36:31 +01:00
|
|
|
};
|
|
|
|
|
2019-12-01 14:51:12 +01:00
|
|
|
class C2 {
|
|
|
|
public:
|
2021-03-25 08:25:43 +01:00
|
|
|
C2(void);
|
2019-12-01 14:51:12 +01:00
|
|
|
private:
|
|
|
|
void* f;
|
|
|
|
};
|
|
|
|
C2::C2() : f(NULL) {}
|
|
|
|
|
2021-03-25 08:25:43 +01:00
|
|
|
static bool test_misra_21_1_crash(void)
|
2019-11-13 20:36:31 +01:00
|
|
|
{
|
2020-09-06 13:25:37 +02:00
|
|
|
auto misra_21_1_C a, b; // 12.3
|
2019-11-13 20:36:31 +01:00
|
|
|
a = b;
|
|
|
|
}
|