GCC’s reordering of read/write instructions
The reordering that GCC may do is unrelated to the reordering an (x86) CPU may do. Let’s start off with compiler reordering. The C language rules are such that GCC is forbidden from reordering volatile loads and store memory accesses with respect to each other, or deleting them, when a sequence point occurs between them … Read more