GCC gives me the following warning message when trying to compile:
las.c:13:18: warning: initializer element is not a constant expression [enabled by default]
const int ROWS = pow (2, MESH_K);
The relevant code portions for this is:
#define MESH_K 10
#define BUFF_SIZE 30
const int ROWS = pow (2, MESH_K);
I need to use both MESH_K and ROWS at later points in the code. I understand that function calls are probably leading GCC to believe that this is not a constant expression. However given that this call to pow is essentially a constant, is there a better way to implement it (pre-processor macros perhaps?) and eliminate the warning?
I don't mind sacrificing readability for performance in this part of the code, so any and all complex solutions are welcome.