Why GNU cpp accepts the following code, even if it starts with the -std = c99 -pedantic flags:
#define z()
#define w(x)
z()
w()
w(1)
The C99 standard requires that the number of arguments in a macro call corresponding to functions correspond to the number of parameters in the macro definition (and is pleased with the idea that the argument may consist of an empty sequence of preprocessing tokens, so the first two calls provide a single empty argument, however), but this is not may be true for all three calls.
Indeed, z should only be called with zero arguments, which is syntactically impossible?
source
share