3 ms·
But C assert.h checks can be disabled by setting NDEBUG and sometimes are for production builds. It’s not meant for bounds checking or anything that required fo
by ahoka 3y ago
But C assert.h checks can be disabled by setting NDEBUG and sometimes are for production builds. It’s not meant for bounds checking or anything that required for correctness, but for asserting invariants, hence the name.
- sph 3y agoIt's a blog post to teach about Wayland, not a production app. If one creates an app by copy-pasting this code, blame them, not the author.
- arghwhat 3y agoYes you can actively disable it. You can also pass "-gcflags=-B" to Go to disable bounds checking, and Rust disables runtime overflow checks in release mode by default. Doesn't make the use any less valid.
- LoganDark 3y agoIn-bounds accesses should be an invariant. A program that is capable of even attempting an out-of-bounds access is probably incorrect. With that said, I would not be confident enough to allow bounds checks to be disabled. (Rust is my favorite.)