2009-05-14 22:39:48 UTC
An API requires that buffers be powers of 2, so I borrowed a macro
from Sean Anderson bit hacks page for the following macro:
#define IS_NOT_POWER_OF_2(v) (((v) & ((v) - 1)) && (v))
I then test the condition:
And this works perfectly. However when I try something closer to my
gcc 3.4.4 reports:
main.cpp:31:34: missing binary operator before token "("
cpp doesn't shed any light, and I have confirmed that my test fails to
compile on other compilers, as well. What am I missing?