your c is not standard c
9 points by nytpu
9 points by nytpu
CX_LIMITED_RANGE is a nightmare source of heisenbugs.
Once when I was working on an embedded project, I had a complex loop variant whos modulus exploded to infinity at night on Tuesdays, causing a fantastic infinite loop that only existed in -O2, with emulation on. The worst part was that the system would still work, interrupts still happened, and the watchdog would do its job, so the only observable behavior was that sometimes the battery life would be awful and I only knew to look at the logs because the MCU was way too hot.