3 ms·
The article stops short of actually telling why would anyone need NOT_CONSTANT
by lostmsu 4mo ago
The article stops short of actually telling why would anyone need NOT_CONSTANT
- gizmo686 4mo agoKeep reading beyond the ad... In short, git has a 'create_ref_symlink' function that is replaced with a macro to '-1' on some build configurations. This means that any code which is conditioned on the success of create_ref_symlink would trigger a compiler warning when built with -Wunreachable-code. NOT_CONSTANT supresses this warning by preventing the compiler from realizing the code is unreachable. It also prevents the compiler from eliminating the dead code, but presumably that has only a negligable impact.