> This might be of interest: > https://gcc.gnu.org/gcc-4.4/porting_to.html > Preprocessor conditionals always evaluated
Also see this: http://lists.boost.org/Archives/boost/2011/08/184657.php ————— This has come up before. The problem is with code like this: #if !defined(SOMETHING) #elif SOMETHING() == 1 #endif In recent versions of gcc it fails when SOMETHING isn't defined because the 'SOMETHING() == 1' clause is always evaluated - even though the if statement has already been resolved. This is apparently compliant with the standard. The solution is to write: #if !defined(SOMETHING) #else # if SOMETHING() == 1 # endif #endif —————— That same technique could be applied by us, as an alternative to the proposed changes. But it’s pretty annoying ugly, with sometimes long string of trailing #endif lines.