[ERROR]
An anonymous type was defined inside parentheses. This is illegal in C++.
void f(enum {BB,AA} a) { // C ok, C++ error
}
Define the type in the global scope.