Hello,
I think I’ve found a bug with the compiler optimization option “Eliminate unnecessary arithmetic.” It appears to be eliminating my else statement, which is not unnecessary arithmetic.
The compiler is removing line https://github.com/Octogonapus/BCI/blob/development/Modules/Heap/heap.c#L38
I have tested this by running my program with and without this optimization option, and the results of each test are different. The program works correctly without this flag, and incorrectly with this flag.