simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

__VA_OPT__ is not handled good enough

Open danmar opened this issue 1 year ago • 0 comments

Example code:

#define P( x, ...) printf( x __VA_OPT__(,) __VA_ARGS__)
#define PF( x, ...) P( x __VA_OPT__(,) __VA_ARGS__)

int main()
{
    PF( "%s", "Hello" );
}

The output from simplecpp is:

int main ( )
{
 printf  ( "%s"  __VA_OPT__  (  ,  ) "Hello"  ) ;
}

danmar avatar Sep 23 '24 14:09 danmar