Section 16.3 paragraph 4 of the C++11 standard reads:
"If the identifier-list in the macro definition does not end with an ellipsis, the number of arguments (including those arguments consisting of no preprocessing tokens) in an invocation of a function-like macro shall equal the number of parameters in the macro definition. Otherwise, there shall be more arguments in the invocation than there are parameters in the macro definition (excluding the ...). There shall exist a ) preprocessing token that terminates the invocation."
When compiling Solaris Studio C++ 12.4 with the '-std=c++11' compiler flag:
#define AMACRO(x,y,z) x+y+z
int x = AMACRO(1);
should be to a preprocessing error.
Yet when invoked with the the compiler it instead only leads to a warning:
"Warning: Too few arguments in macro AMACRO"
Is there some compiler switch which will generate an error instead of a warning for this situation ?