Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22248

Swallowing comma in variadic macros on compilers that do not recognise ##

$
0
0

I need to write a variadic macro in C which must take zero or more arguments.

In gcc, that can be achieved by adding "##" after the comma, e.g. ,##____VA_ARGS____ as answered in Variadic macros with zero arguments.

However, the compiler in my build system (beyond my control) does not understand the ,## syntax and so does not swallow the comma.

Is there a workaround I can use?

Thanks!


Viewing all articles
Browse latest Browse all 22248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>