https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86761
--- Comment #2 from Hans de Jong <r.j.dejong at student dot utwente.nl> --- Unfortunately option -fsanitize=undefined does not link while using the arm-none-eabi cross compiler, since a typical embedded target does not have enough memory for such run-time libraries. In order to catch these kind of errors during compilation time, I will have to enable -Werror instead as a work-around, which is a sane thing to do nonetheless. I would like to point out that GCC 8.1 removes the complete compound statement with the offending call. GCC 7.x did not exhibit this behaviour. Does this still fall under the umbrella of unpredictable behaviour? It becomes harder to track down these kind of errors when the proximity from offending code increases.