Hacker News new | ask | show | jobs
by synergy20 935 days ago
very informative,also there is __GLIBCXX_DEBUG etc to catch errors sanitizer can not detect
2 comments

We did include `-D_GLIBCXX_ASSERTIONS` but we intentionally did not include `-D_GLIBCXX_DEBUG`, because we've been focusing on production releases.

The current plan is to add more information distinguishing between production code and instrumented test code, and adding options specific to each. There are many options that might make sense for instrumented test code that don't make sense for production code (and vice versa).

typically for production releases I have -DNDEBUG, which will disable -D_GLIBCXX_ASSERTIONS
It's _GLIBCXX_DEBUG (one leading underscore) and it's not a good idea to use it in release builds, unlike the original comment's proposal.