title: C debug macro: error: expected expression
body: <p>Every time, I invoke the below C debug macro, I have to pass some argument. Else compilation fails.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #define debug(fmt, ...)\
  do{\
  fprintf(stdout, "%s(%d) : " fmt, __FUNCTION__, __LINE__, __VA_ARGS__);\
  }while(0)
  
  int
  main()
  {
      debug("Debug 1");
  }   
  </code></pre>
  
  <p>Here is the compilation error :</p>
  
  <blockquote>
    <p>test.c:12:5: error: expected expression
            debug("Debug 1");
        ^ test.c:6:70: note: expanded from macro 'debug'
            fprintf(stdout, "%s(%d) : " fmt, <strong>FUNCTION</strong>, <strong>LINE</strong>, <strong>VA_ARGS</strong>);\
                                                                                ^ 1 error generated.</p>
  </blockquote>
  
  <p>If  I invoke the same macro with an argument :</p>
  
  <pre><code>debug("Debug 1 %s", "");
  </code></pre>
  
  <p>It compiles fine with no issues. Is is because of the compiler ? Does it work in latest compiler ?</p>