For some imperscrutable reason, in my code I have something like:
#define pippo(x) printf("%d",x)
...
... many lines down in the code
...
int pippo = 0;
The same identifier pippo has been used for both a function-like macro and a variable name! Beside the confusion this could arise in the poor maintainer, I was wondering if this is legal by the standard.
Both C99 and C11 (in 6.10.3.) say:
10 [...] Each subsequent instance of the function-like macro name followed by a ( as the next preprocessing token introduces the sequence of preprocessing tokens that is replaced by the replacement list in the definition [...]
They don't say what happens if the function-like macro name is not followed by a '(' and I'm worried that some compiler might consider that this is an error (or might just emit a warning).
Am I too much of a worrywart?