I want to make a few read-only variables, at file-scope. A couple of them are dependent on other such variables. A sample code is as follows:
static const double A = 1.0;
static const double B = A/5;
int main(){}
Compiling this gives me the error:
expression must have a constant value
But GCC does not complain. Is this a bug in ICC, or is it GCC that isn't standard compliant?
Is this relevant: ?
https://software.intel.com/en-us/forums/intel-c-compiler/topic/286645