title: Syntax error: expected expression before ‘do’
body: <p>I am trying to compile this software package: <a href="http://sourceforge.net/projects/snap-graph/?source=dlp" rel="nofollow">http://sourceforge.net/projects/snap-graph/?source=dlp</a></p>
  
  <p>I hit a syntax error here:</p>
  
  <pre><code>gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I../include   -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math -MT drive_seed_community_detection.o -MD -MP -MF .deps/drive_seed_community_detection.Tpo -c -o drive_seed_community_detection.o drive_seed_community_detection.c
  drive_seed_community_detection.c: In function ‘identify_comm’:
  drive_seed_community_detection.c:214:14: error: expected expression before ‘do’
  make[2]: *** [drive_seed_community_detection.o] Fehler 1
  make[2]: Leaving directory `/amd.home/home/s/workspace/snap-0.4/test'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/amd.home/home/s/workspace/snap-0.4'
  make: *** [all] Error 2
  </code></pre>
  
  <p>The relevant code section where the error appear is. In particular, line 214: <code>queue[atomic_fetch_and_add (&amp;k2, 1)] = w;</code> Any ideas what might be the problem?</p>
  
  <pre><code>  /* Find and label the connected components. */
    ncomm = 0;
    for (attr_id_t kseed = 0; kseed &lt; num_seeds; ++kseed) {
      attr_id_t k1, k2;
      const attr_id_t seedv = seeds[kseed];
      if (membership[seedv] != -2) continue;
      queue[0] = seedv;
      membership[seedv] = seedv;
      comm_root[ncomm] = seedv;
  
      k1 = 0;
      k2 = 1;
      do {
        const attr_id_t qkend = k2;
        attr_id_t cv = 0;
        OMP("omp parallel for reduction(+:cv)")
        for (attr_id_t k1i = k1; k1i &lt; qkend; ++k1i) {
          const attr_id_t v = queue[k1i];
          const attr_id_t deg = xoff[v+1] - xoff[v];
          cv += deg;
          if (deg &gt; comm_maxdeg[ncomm]) comm_maxdeg[ncomm] = deg;
          for (attr_id_t k = xoff[v]; k &lt; xoff[v+1]; ++k) {
            const attr_id_t w = xadj[k];
            attr_id_t memb;
            if (membership[w] &lt; -1) {
              atomic_val_compare_and_swap (memb, &amp;membership[w], -2, seedv);
              if (memb &lt; -1) {
                //if (membership[w] &lt; -1) {
                //membership[w] = seedv;
                //int loc;
                //OMP("omp atomic") loc = k2++;
                queue[atomic_fetch_and_add (&amp;k2, 1)] = w;
              }
            }
          }
        }
        k1 = qkend;
        comm_vol[ncomm] = cv;
      } while (k1 != k2);
      comm_size[ncomm] = k2;
      ++ncomm;
    }
  </code></pre>