I think in the world of C, the compiler assumes the author knows what they're doing, and historically, you were probably supposed to use a separate tool, a linter [1] (static analysis tool), to help catch mistakes.
HN's hard disks were a recent (2022-07) victim of a firmware developer's lack of understanding of integer overflow exceptions. [2] The firmware was likely written in C, or "C++ C". A fix was released in 2020. Another reminder to update the firmware of these disks. [3]
++crash;
[1] https://en.wikipedia.org/wiki/Lint_(software)
[2] https://en.wikipedia.org/wiki/Integer_overflow
[3] https://www.thestack.technology/ssd-death-bug-40000-hours-sa...