if this is what you want, it is possible with a trick. this seems to work. if you just put a literal non-string ) as the argument to M, the parser sees it as a closing paren and pukes. But if you do it with the #define P then that all gets substituted in before being parsed.
Code:
#define P )
#define M(a) f(a
void f(void)
{
}
int main(int argc,char *argv[])
{
M(P);
return 0;
}
the Visual C preprocessor outputs this
Code:
C:\home\dh0072\x\x1>cl /E x1.c
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
x1.c
#line 1 "x1.c"
void f(void)
{
}
int main(int argc,char *argv[])
{
f();
return 0;
}