Maki only reports if a macro invocation appears where an integral constant expression is required, but not where a constant expression in general is required.
For instance, in the following code snippet:
#define PI 3.14
#define R 5
float radius = R;
int main(void) {
static double circumference = 2 * PI * R;
return 0;
}
Maki should report that both PI and R are expanded where constant expressions are required, because they appear in the initializers of variables with global and static storage.
Maki only reports if a macro invocation appears where an integral constant expression is required, but not where a constant expression in general is required.
For instance, in the following code snippet:
Maki should report that both
PI
andR
are expanded where constant expressions are required, because they appear in the initializers of variables with global and static storage.