#define bla(x) do { … } while(0);
is a common idiom (which is supposed to be constant), seems stupid of
the compiler to complain about that.
That your compiler gives a warning about while(0) being constant but not
about while(-1 == LINE) being constant (even though it is just as
constant), is inconsistent and likely to “break” with later versions of
the compiler or other compilers.
Cheers,
DanielAm 06.09.2013 21:42, schrieb Matej ?vec:
Hello,
I’m compiling SDL2 app with msvc 2012 with /W4 setting.
When using SDL_assert* macros, msvc is complaining:
warning C4127: conditional expression is constant
I’ve solved this by changing the condition, see the attached patch.