I wish Ghidra could understand these constructs (or alternatively, I knew how to tell Ghidra to override these incorrectly decompiled statements)
Simple example:
struct
{
int16_t x;
int16_t y;
} foo;
*(undefined4*)&foo.x = 0xffffffff;
More extreme example:
char x[25];
*(undefined8*)&x[0] = 0x7320656c706d617865
*(undefined8*)&x[8] = 0x206e6f20676e697274
*(undefined8*)&x[16] = 0x6b6361747320656874
x[24] = '\x00';
Seen commonly in vectors:
vector<some_type *> foo;
size = (int)(long)((long)foo._M_finish - (long)foo._M_start) >> 3;
This one is easy to override, but still very annoying.
return in_RAX & 0xffffffffffffff00 | (some_condition));