I read this question that explains how anonymous variables are invalid in C++.
But the following program compiles without any warning or errors on GCC 7.2 (even with -Wall
) - demo:
int main() {
int (*); // anonymous variable?
}
Here, this is apparently also an integer type anonymous variable. So, why GCC does not show any errors or warnings? Is this a GCC bug?