title: C: Convert A ? B : C into if (A) B else C
body: <p>I was looking for a tool that can convert C code expressions for the form:</p>
  
  <pre><code>a = (A) ? B : C;
  </code></pre>
  
  <p>into the 'default' syntax with <code>if</code>/<code>else</code> statements:</p>
  
  <pre><code>if (A)
    a = B
  else
    a = C
  </code></pre>
  
  <p>Does someone know a tool that's capable to do such a transformation?</p>
  
  <p>I work with GCC 4.4.2 and create a preprocessed file with <code>-E</code> but do not want such structures in it.</p>
  
  <p>Edit:
  Following code should be transformed, too:</p>
  
  <pre><code>a = ((A) ? B : C)-&gt;b;
  </code></pre>