When using `gcc -fsanitize=undefined`, the compiler proves trivial results, so `DXX_CONSTANT_TRUE` is defined. It then fails to prove that `DXX_CONSTANT_TRUE(m_state == checked)` is false, causing a compile-time error. Relax the check to occur only when it can prove `m_state` equal to a disallowed value, rather than when it cannot prove `m_state` equal to an allowed value. Move the preprocessor guard so that the runtime check is always visible. Optimizing compilers can still eliminate that check at compile-time when it provably never fails. |
||
---|---|---|
common | ||
contrib | ||
d1x-rebirth | ||
d2x-rebirth | ||
Documentation | ||
similar | ||
.gitignore | ||
COPYING.txt | ||
GPL-3.txt | ||
INSTALL.markdown | ||
SConstruct |