Hacker News new | ask | show | jobs
by pmarin 1149 days ago
And why this is not the default behaviur?

I am pretty sure many users are going to think it is correctness check an not an optimization attribute.

2 comments

I'd rather not have a basic feature be put behind needing to define an arbitrary NDEBUG; having to define your debugging setup around NDEBUG would not fit some things - e.g. in my case I'd end up having to always define NDEBUG, and continue with my own wrapper around things. (with <assert.h> you have the option of writing your own thing if you don't like its NDEBUG check, which is what I do; with unreachable(), if you literally cannot get its functionality other than NDEBUG, you're stuck with NDEBUG).
Because C is a "do exactly as I say" language.