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:
|
2022-06-06 22:22:52 +02:00
|
|
|
misra_21_1_C operator=(const misra_21_1_C &);
|
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;
|
|
|
|
};
|
2022-01-18 20:59:30 +01:00
|
|
|
C2::C2(void) : f(NULL) {}
|
2019-12-01 14:51:12 +01:00
|
|
|
|
2022-01-18 20:55:30 +01:00
|
|
|
static void test_misra_21_1_crash(void)
|
2019-11-13 20:36:31 +01:00
|
|
|
{
|
2022-06-07 20:55:55 +02:00
|
|
|
auto misra_21_1_C a, b; // 12.3
|
2019-11-13 20:36:31 +01:00
|
|
|
a = b;
|
|
|
|
}
|