1 post tagged #compiler-flags.
#compiler-flags
A release build usually adds -DNDEBUG and expects its checks to vanish. On GCC 16.2 that deletes assert(), but contract_assert is a language feature and keeps running. With -fcontracts it terminates under the default enforce semantic, even with -O3 -flto. Only -fcontract-evaluation-semantic=ignore stops the evaluation. The post gives six measured flag sets and one link error.
// We use Google Analytics to understand which posts get traction and how the wro.cpp community grows. Anonymised, no ads, and you can decline -- the site works either way.