Compiling the following program with -Wall
struct MyType{};
int main() { int size = 0; int temp1[size]; }
I get the following warning:
x12.cpp: In function `int main()': x12.cpp:6: warning: unused variable `int temp1[((size - 1) + 1)]'
I was rather surprised by "((size - 1) + 1)" part.
While this is a rather unimportant issue I would be interested to know why 1 is subtracted and then added again. I see no sense in this and really would like to get an explanation for this warning text.
Thx very much!
Christoph